def name_mapper(name=None):
    """
    General Purpose name remapping function
    If not fed a name, it returns the mapping dictionary
    If fed a name, it returns either the mapped name or the name (if no mapping is defined)
    Parameters
    ----------
    name: string
        The name of a JWST object
    Returns
    -------
    dictionary or string
        Either the remapped string (where necessary) or the complete mapping dictionary.
    """
    short_str_mappings = {'nircam ssgrism': 'nircam lw_tsgrism',
        'nirspec msa': 'nirspec mos', 'ssgrism': 'lw_tsgrism', 'msa': 'mos'}
    if name is None:
        return short_str_mappings
    elif name in short_str_mappings:
        return short_str_mappings[name]
    else:
        return name
