<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_mapping(record, keys):
 """Create a field mapping for use in API updates and creates. Args: record (BaseModel):
 Record that should be mapped. keys (list[str]):
 Fields that should be mapped as keys. Returns: dict: Dictionary with keys: * ``field_mappings``: Field mappings as required by API. * ``data``: Ordered data dictionary for input record. """


        ordered = OrderedDict()
        field_mappings = []

        for key, value in record.items():
            ordered[key] = value
            field_mappings.append({
                'columnNumber': len(ordered),  # Five9 is not zero indexed.
                'fieldName': key,
                'key': key in keys,
            })

        return {
            'field_mappings': field_mappings,
            'data': ordered,
            'fields': list(ordered.values()),
        }