code: def sourcehook(self, newfile, encoding='utf-8'):
          "Hook called on a filename to be sourced."
          from codecs import open
          if newfile[0] == '"':
              newfile = newfile[1:-1]
          # This implements cpp-like semantics for relative-path inclusion.
          if isinstance(self.infile, basestring) and not os.path.isabs(newfile):
              newfile = os.path.join(os.path.dirname(self.infile), newfile)
          return (newfile, open(newfile, "r", encoding)f sourcehook(self, newfile, encoding='utf-8'):
          "Hook called on a filename to be sourced."
          from codecs import open
          if newfile[0] == '"':
              newfile = newfile[1:-1]
          # This implements cpp-like semantics for relative-path inclusion.
          if isinstance(self.infile, basestring) and not os.path.isabs(newfile):
              newfile = os.path.join(os.path.dirname(self.infile), newfile)
          return (newfile, open(newfile, "r", encoding))
docs: Hook called on a filename to be sourced.