code: def path_is_inside(path, dirname):
      
      path = os.path.abspath(path)
      dirname = os.path.abspath(dirname)
      while len(path) >= len(dirname):
          if path == dirname:
              return True
          newpath = os.path.dirname(path)
          if newpath == path:
              return False
          path = newpath
      return False
docs: Return True if path is under dirname.