def __call__(self, func):
        def wrapped_func(*args, **kwargs):
            """This function gets executed, if the wrapped function gets called.

            It automatically created a performance profile for the corresponding function call.
            """
            # create the profiler and execute the called function
            profiler = profile.Profile()
            result   = profiler.runcall(func, *args, **kwargs)

            # store the performance profile
            filename = "%s" % (self._filelocation)
            profiler.dump_stats(filename)

            # return the result
            return result

        self._func = func
        setattr(wrapped_func, "__name__", self._func.__name__)
        setattr(wrapped_func, "__repr__", self._func.__repr__)
        setattr(wrapped_func, "__str__", self._func.__str__)
        setattr(wrapped_func, "__doc__", self._func.__doc__)

        return wrapped_func

# This is the "real decorator"
# Usage: @profileMe
Returns a wrapped version of the called function.
dataset/ETHPy150Open T-002/pycast/pycast/common/profileme.py/_ProfileDecorator.__call__