def apply_decorator_to_funcitem(decorator: nodes.Expression, func: nodes.FuncItem) -> Optional[nodes.FuncItem]:
    if (not isinstance(decorator, nodes.RefExpr)):
        return None
    if (decorator.fullname is None):
        return None
    if (decorator.fullname in ('builtins.staticmethod', 'typing.overload', 'abc.abstractmethod')):
        return func
    if (decorator.fullname == 'builtins.classmethod'):
        assert (func.arguments[0].variable.name in ('cls', 'metacls'))
        ret = copy.copy(func)
        ret.arguments = ret.arguments[1:]
        return ret
    return None
def apply_decorator_to_funcitem(decorator: nodes.Expression, func: nodes.FuncItem) -> Optional[nodes.FuncItem]:
    if (not isinstance(decorator, nodes.RefExpr)):
        return None
    if (decorator.fullname is None):
        return None
    if (decorator.fullname in ('builtins.staticmethod', 'typing.overload', 'abc.abstractmethod')):
        return func
    if (decorator.fullname == 'builtins.classmethod'):
        assert (func.arguments[0].variable.name in ('cls', 'metacls'))
        ret = copy.copy(func)
        ret.arguments = ret.arguments[1:]
        return ret
    return None