code: def extension_elements_to_elements(extension_elements, schemas):
      
      res = []
  
      if isinstance(schemas, list):
          pass
      elif isinstance(schemas, dict):
          schemas = list(schemas.values())
      else:
          return res
  
      for extension_element in extension_elements:
          for schema in schemas:
              inst = extension_element_to_element(extension_element,
                                                  schema.ELEMENT_FROM_STRING,
                                                  schema.NAMESPACE)
              if inst:
                  res.append(inst)
                  break
  
      return res
docs: Create a list of elements each one matching one of the
      given extension elements. This is of course dependent on the access
      to schemas that describe the extension elements.
  
      :param extension_elements: The list of extension elements
      :param schemas: Imported Python modules that represent the different
          known schemas used for the extension elements
      :return: A list of elements, representing the set of extension elements
          that was possible to match against a Class in the given schemas.
          The elements returned are the native representation of the elements
          according to the schemas.