def parse_context_table_records_list(records_list: list, fmt: str, is_delete: bool = False):
    """ Parses records list given as an argument in context tables management commands.

    Args:
        records_list: The list of records
        fmt: The format of each record, e.g. id:key:value
        is_delete: Whether or not it is a delete request
    Returns:
        (list) The records, in request payload format.
    """
    records = []
    for record_item in records_list:
        record_item = record_item.split(':')
        keys = fmt.split(':')
        if len(keys) != len(record_item):
            raise ValueError('records argument is malformed.')

        record = {k: v for k, v in zip(keys, record_item)}
        if is_delete:
            record['key'] = ''
        if record.get('value'):
            record['value'] = record['value'].split(';')
        elif record.get('value') == '':
            record['value'] = []
        records.append(record)
    return records