def unify_units(dic):
    """Unifies names of units.

    Some units have different spelling although they are the same units.
    This functions replaces different spelling options by unified one.

    Example of British English spelling replaced by US English spelling::

        >>> unify_units({'units': ['metres'], 'unit': ['metre']})  # doctest: +SKIP
        {'units': ['meters'], 'unit': ['meter']}

    :param dic: The dictionary containing information about units

    :return: The dictionary with the new values if needed or a copy of old one
    """
    # the lookup variable is a list of list, each list contains all the
    # possible name for a units
    lookup = [['meter', 'metre'], ['meters', 'metres'],
              ['Meter', 'Metre'], ['Meters', 'Metres'],
              ['kilometer', 'kilometre'], ['kilometers', 'kilometres'],
              ['Kilometer', 'Kilometre'], ['Kilometers', 'Kilometres'],
              ]
    dic = dict(dic)
    for l in lookup:
        if not isinstance(dic['unit'], str):
            for n in range(len(dic['unit'])):
                if dic['unit'][n] in l:
                    dic['unit'][n] = l[0]
        else:
            if dic['unit'] in l:
                dic['unit'] = l[0]
        if not isinstance(dic['units'], str):
            for n in range(len(dic['units'])):
                if dic['units'][n] in l:
                    dic['units'][n] = l[0]
        else:
            if dic['units'] in l:
                dic['units'] = l[0]
    return dic