code: def ModulePath(module_name):
    
    module = importlib.import_module(module_name)
    path = inspect.getfile(module)
    # TODO: In Python 2 `inspect.getfile` returns a byte string, so
    # we have to decode that in order to be consistent with Python 3.
    if compatibility.PY2:
      path = path.decode("utf-8")
  
    # In case of modules with want a path to the directory rather than to the
    # `__init__.py` file itself.
    if os.path.basename(path).startswith("__init__."):
      path = os.path.dirname(path)
  
    # Sometimes __file__ points at a .pyc file, when we really mean the .py.
    if path.endswith(".pyc"):
      path = path[:-4] + ".py"
  
    return path
docs: Computes a path to the specified module.
  
    Args:
      module_name: A name of the module to get the path for.
  
    Returns:
      A path to the specified module.
  
    Raises:
      ImportError: If specified module cannot be imported.