code: def is_path(path):
      
      if not isinstance(path, basestring):
          return False
      portal_path = get_path(get_portal())
      if not path.startswith(portal_path):
          return False
      obj = get_object_by_path(path)
      if obj is None:
          return False
      return True
docs: Checks if the passed in path is a valid Path within the portal
  
      :param path: The path to check
      :type uid: string
      :return: True if the path is a valid path within the portal
      :rtype: bool