def __call__(self, function=None, firstresult=False, historic=False):
        def setattr_hookspec_opts(func):
            if historic and firstresult:
                raise ValueError("cannot have a historic firstresult hook")
            setattr(func, self.project_name + "_spec",
                   dict(firstresult=firstresult, historic=historic))
            return func

        if function is not None:
            return setattr_hookspec_opts(function)
        else:
            return setattr_hookspec_opts
if passed a function, directly sets attributes on the function
dataset/ETHPy150Open pytest-dev/pytest/_pytest/vendored_packages/pluggy.py/HookspecMarker.__call__