'stacklevel is the depth a which this function is called, to
issue useful warnings to the user.'

def _check_previous_func_code(self, stacklevel=2):

    try:
        if (self.func in _FUNCTION_HASHES):
            func_hash = self._hash_func()
            if (func_hash == _FUNCTION_HASHES[self.func]):
                return True
    except TypeError:
        pass
    (func_code, source_file, first_line) = get_func_code(self.func)
    func_dir = self._get_func_dir()
    func_code_file = os.path.join(func_dir, 'func_code.py')
    try:
        with io.open(func_code_file, encoding='UTF-8') as infile:
            (old_func_code, old_first_line) = extract_first_line(infile.read())
    except IOError:
        self._write_func_code(func_code_file, func_code, first_line)
        return False
    if (old_func_code == func_code):
        return True
    (_, func_name) = get_func_name(self.func, resolv_alias=False, win_characters=False)
    if ((old_first_line == first_line == (-1)) or (func_name == '<lambda>')):
        if (not (first_line == (-1))):
            func_description = ('%s    (%s:%i)' % (func_name, source_file, first_line))
        else:
            func_description = func_name
        warnings.warn(JobLibCollisionWarning(("Cannot    detect    name    collisions    for    function    '%s'" % func_description)), stacklevel=stacklevel)
    if ((not (old_first_line == first_line)) and (source_file is not None)):
        possible_collision = False
        if os.path.exists(source_file):
            (_, func_name) = get_func_name(self.func, resolv_alias=False)
            num_lines = len(func_code.split('\n'))
            with open_py_source(source_file) as f:
                on_disk_func_code = f.readlines()[(old_first_line - 1):(((old_first_line - 1) + num_lines) - 1)]
            on_disk_func_code = ''.join(on_disk_func_code)
            possible_collision = (on_disk_func_code.rstrip() == old_func_code.rstrip())
        else:
            possible_collision = source_file.startswith('<doctest    ')
        if possible_collision:
            warnings.warn(JobLibCollisionWarning(("Possible    name    collisions    between    functions    '%s'    (%s:%i)    and    '%s'    (%s:%i)" % (func_name, source_file, old_first_line, func_name, source_file, first_line))), stacklevel=stacklevel)
    if (self._verbose > 10):
        (_, func_name) = get_func_name(self.func, resolv_alias=False)
        self.warn(('Function    %s    (stored    in    %s)    has    changed.' % (func_name, func_dir)))
    self.clear(warn=True)
    return False
