code: def load_pyfile(self, path):
          
          with open(path) as config_file:
              contents = config_file.read()
              try:
                  exec(compile(contents, path, 'exec'), self)
              except Exception as e:
                  raise MalformedConfig(path, six.text_type(e))
docs: Load python file as config.
  
          Args:
              path (string): path to the python file