import copy


def _get_fast_reader_dict(kwargs):
    """Convert 'fast_reader' key in kwargs into a dict if not already and make sure
    'enable' key is available.
    """
    fast_reader = copy.deepcopy(kwargs.get('fast_reader', True))
    if isinstance(fast_reader, dict):
        fast_reader.setdefault('enable', 'force')
    else:
        fast_reader = {'enable': fast_reader}
    return fast_reader