USD/Z schemas and Declarations

How is it possible to add a schema for ar to a usd file using the python tools (or any other way).

Following the instructions in: https://developer.apple.com/documentation/arkit/arkit_in_ios/usdz_schemas_for_ar/actions_and_triggers/preliminary_behavior

The steps are to have the following declaration:

class Preliminary_Behavior "Preliminary_Behavior" (
    inherits = </Typed>
)

and a usd file

#usda 1.0

def Preliminary_Behavior "TapAndFlip"
{
    rel triggers = [ <Tap> ]
    rel actions = [ <Entry> ]


    def Preliminary_Trigger "Tap" ( inherits = </TapGestureTrigger> )
    {
        rel affectedObjects = [ </Cube> ]
    }


    def Preliminary_Action "Entry" ( inherits = </GroupAction> )
    {
        uniform token type = "parallel"
        rel actions = [ <Flip> ]
    }


    def Preliminary_Action "Flip" ( inherits = </EmphasizeAction> )
    {
        rel affectedObjects = [ </Cube> ]
        uniform token motionType = "flip"
    }
}


def Cube "Cube" { }

How do these parts fit together? I saved the usda file, but it didn't have any interactions. Obviously, I have to add that declaration, but how do I do this? is this all in an AR Xcode project? Or can I do this with python tools (I would prefer something very lightweight).

USD/Z schemas and Declarations
 
 
Q