code: def filename(self, exists=os.path.exists, cython_suffix_re=CYTHON_SUFFIX_RE):
          
          filename = self.frame.f_globals.get('__file__', '')
          if filename is None:
              filename = ''
  
          if filename.endswith(('.pyc', '.pyo')):
              filename = filename[:-1]
          elif filename.endswith('$py.class'):  # Jython
              filename = filename[:-9] + ".py"
          elif filename.endswith(('.so', '.pyd')):
              basename = cython_suffix_re.sub('', filename)
              for ext in ('.pyx', '.py'):
                  cyfilename = basename + ext
                  if exists(cyfilename):
                      filename = cyfilename
                      break
          return filename
docs: A string with absolute path to file.
  
          :type: str