def METHOD_NAME(v):
    if isinstance(v, (list, tuple)):
        return list(map(METHOD_NAME, v))
    v = field2string(v)
    # handle trailing 'L' if present.
    if v[-1:] in ('L', 'l'):
        v = v[:-1]
    if v:
        try:
            return int(v)
        except ValueError:
            raise ValueError(
                "A long integer was expected in the value %r" %
                html.escape(
                    v, True))
    raise ValueError('Empty entry when <strong>integer</strong> expected')