'Write the function code and the filename to a file.'

def _write_func_code(self, filename, func_code, first_line):

    func_code = (u'%s    %i\n%s' % (FIRST_LINE_TEXT, first_line, func_code))
    with io.open(filename, 'w', encoding='UTF-8') as out:
        out.write(func_code)
    is_named_callable = False
    if PY3_OR_LATER:
        is_named_callable = (hasattr(self.func, '__name__') and (self.func.__name__ != '<lambda>'))
    else:
        is_named_callable = (hasattr(self.func, 'func_name') and (self.func.func_name != '<lambda>'))
    if is_named_callable:
        func_hash = self._hash_func()
        try:
            _FUNCTION_HASHES[self.func] = func_hash
        except TypeError:
            pass
