code: def generate_element_class(tuple_instance):
      
      schema = tuple_to_schema(tuple_instance)
  
      def defaults(self):
          return {}
  
      def schema_getter(self):
          return schema
  
      new_class_name = "PREMIS{}Element".format(schema[0].capitalize())
      return type(
          new_class_name,
          (PREMISElement,),
          {"defaults": property(defaults), "schema": property(schema_getter)},
      )
docs: Dynamically create a sub-class of PREMISElement given
      ``tuple_instance``, which is a tuple representing an XML data structure.