How do I define a family parameter in RevitAPI 2023 using python block in DesignScript?

I think this looks like what you need. Uses Crumple, but you can dissect @GavinNicholls custom nodes as needed.

Additional information here from the API docs.