Motionbuilder how to delete my custom attr by python

motionbuilder how to delete my custom attr by python。I just can add attr to my Object。

:roll_eyes: :roll_eyes: anyone can Help me?

def delete_attr(obj, *attr_names):
    """
    Deletes obj custom properties. If attr_names is not specified, deletes all custom properties.
    
    """
    for attr in reversed(obj.PropertyList):
        if attr.IsUserProperty():
            if not len(attr_names) or attr.Name in attr_names:
                obj.PropertyRemove(attr)