code: def from_dict(cls, fields, mapping):
          
          iterable = [None] * len(fields)
          for key, value in mapping.items():
              try:
                  index = fields.index(key)
              except KeyError:
                  raise ItsdbError('Invalid field name(s): ' + key)
              iterable[index] = value
          return cls(fields, iterable)
docs: Create a Record from a dictionary of field mappings.
  
          The *fields* object is used to determine the column indices
          of fields in the mapping.
  
          Args:
              fields: the Relation schema for the table of this record
              mapping: a dictionary or other mapping from field names to
                  column values
          Returns:
              a :class:`Record` object