def get_converter(from_unit, to_unit):
    'Like Unit._get_converter, except returns None if no scaling is needed,\n    i.e., if the inferred scale is unity.'
    try:
        scale = from_unit._to(to_unit)
    except UnitsError:
        return from_unit._apply_equivalencies(from_unit, to_unit, get_current_unit_registry().equivalencies)
    except AttributeError:
        raise UnitTypeError("Unit '{0}' cannot be converted to '{1}'".format(from_unit, to_unit))
    if (scale == 1.0):
        return None
    else:
        return (lambda val: (scale * val))
Like Unit._get_converter, except returns None if no scaling is needed,
i.e., if the inferred scale is unity.
def get_converter(from_unit, to_unit):
    'Like Unit._get_converter, except returns None if no scaling is needed,\n    i.e., if the inferred scale is unity.'
    try:
        scale = from_unit._to(to_unit)
    except UnitsError:
        return from_unit._apply_equivalencies(from_unit, to_unit, get_current_unit_registry().equivalencies)
    except AttributeError:
        raise UnitTypeError("Unit '{0}' cannot be converted to '{1}'".format(from_unit, to_unit))
    if (scale == 1.0):
        return None
    else:
        return (lambda val: (scale * val))