code: def create_model(cls, data: dict, fields=None):
          '''
          Creates model instance from data (dict).
          '''
          if fields is None:
              fields = set(cls._fields.keys())
          else:
              if not isinstance(fields, set):
                  fields = set(fields)
          new_keys = set(data.keys()) - fields
          if new_keys:
              for new_key in new_keys:
                  del data[new_key]
          return cls(dataf create_model(cls, data: dict, fields=None):
          '''
          Creates model instance from data (dict).
          '''
          if fields is None:
              fields = set(cls._fields.keys())
          else:
              if not isinstance(fields, set):
                  fields = set(fields)
          new_keys = set(data.keys()) - fields
          if new_keys:
              for new_key in new_keys:
                  del data[new_key]
          return cls(data)
docs: Creates model instance from data (dict).