code: def get_root_path(self, name):
          
          module = modules.get(name)
          if module is not None and hasattr(module, '__file__'):
              return dirname(abspath(module.__file__))
  
          # Flask keeps looking at this point. We instead set the root path to None,
          # assume that the user doesn't need resource loading, and raise an error
          # when resolving the resource path.
          return None
docs: Attempt to compute a root path for a (hopefully importable) name.
  
          Based in part on Flask's `root_path` calculation. See:
  
              https://github.com/mitsuhiko/flask/blob/master/flask/helpers.py#L777