code: def data2schemacls(_data, **kwargs):
      
      content = {}
  
      for key in list(kwargs):  # fill kwargs
          kwargs[key] = data2schema(kwargs[key])
  
      if isinstance(_data, dict):
          datacontent = iteritems(_data)
  
      else:
          datacontent = getmembers(_data)
  
      for name, value in datacontent:
  
          if name[0] == '_':
              continue
  
          if isinstance(value, dict):
              schema = data2schemacls(value)()
  
          else:
              schema = data2schema(value)
  
          content[name] = schema
  
      content.update(kwargs)  # update content
  
      result = type('GeneratedSchema', (Schema,), content)
  
      return result
docs: Convert a data to a schema cls.
  
      :param data: object or dictionary from where get a schema cls.
      :return: schema class.
      :rtype: type