def _cache(self, func, func_memory_level=<NUM_LIT:1>, **kwargs):
verbose = getattr(self, '<STR_LIT>', <NUM_LIT:0>)<EOL>if not hasattr(self, "<STR_LIT>"):<EOL><INDENT>self.memory_level = <NUM_LIT:0><EOL><DEDENT>if not hasattr(self, "<STR_LIT>"):<EOL><INDENT>self.memory = Memory(cachedir=None, verbose=verbose)<EOL><DEDENT>if isinstance(self.memory, _basestring):<EOL><INDENT>self.memory = Memory(cachedir=self.memory, verbose=verbose)<EOL><DEDENT>if self.memory_level == <NUM_LIT:0>:<EOL><INDENT>if (isinstance(self.memory, _basestring)<EOL>or self.memory.cachedir is not None):<EOL><INDENT>warnings.warn("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>self.memory_level = <NUM_LIT:1><EOL><DEDENT><DEDENT>return cache(func, self.memory, func_memory_level=func_memory_level,<EOL>memory_level=self.memory_level, **kwargs)<EOL>
Return a joblib.Memory object.

        The memory_level determines the level above which the wrapped
        function output is cached. By specifying a numeric value for
        this level, the user can to control the amount of cache memory
        used. This function will cache the function call or not
        depending on the cache level.

        Parameters
        ----------
        func: function
            The function the output of which is to be cached.

        memory_level: int
            The memory_level from which caching must be enabled for the wrapped
            function.

        Returns
        -------
        mem: joblib.Memory
            object that wraps the function func. This object may be
            a no-op, if the requested level is lower than the value given
            to _cache()). For consistency, a joblib.Memory object is always
            returned.