def METHOD_NAME(cls, t):
    # match as normal
    try:
        return cls._parse_unit(t.value)
    except ValueError as exc:
        name = t.value
        sname = name[:-1] if name.endswith('s') else ''
        # parse alternative units from the error message
        match = cls.re_closest_unit.search(str(exc))
        try:  # split 'A, B, or C' -> ['A', 'B', 'C']
            alts = cls.re_closest_unit_delim.split(match.groups()[0])[::2]
        except AttributeError:
            alts = []
        alts = list(set(alts))
        # match uppercase to titled (e.g. MPC -> Mpc)
        if name.title() in alts:
            alt = name.title()
        # match titled unit to lower-case (e.g. Amp -> amp)
        elif name.lower() in alts:
            alt = name.lower()
        # match plural to singular (e.g. meters -> meter)
        elif sname in alts:
            alt = sname
        elif sname.lower() in alts:
            alt = sname.lower()
        else:
            if cls.warn:
                warnings.warn(
                    f"{str(exc).rstrip(' ')} Mathematical operations "
                    "using this unit should work, but conversions to "
                    "other units will not.",
                    category=units.UnitsWarning)
            try:  # return previously created unit
                return UNRECOGNIZED_UNITS[name]
            except KeyError:  # or create new one now
                u = UNRECOGNIZED_UNITS[name] = units.def_unit(
                    name, doc='Unrecognized unit')
                return u
        return cls._parse_unit(alt)