code: def _location_infos_equal(left, right):
      
      if not isinstance(left, LocationInfo) or not isinstance(right, LocationInfo):
          raise AssertionError(
              u'Unsupported LocationInfo comparison between types {} and {} '
              u'with values {}, {}'.format(type(left), type(right), left, right))
      optional_scopes_depth_equal = (left.optional_scopes_depth == right.optional_scopes_depth)
  
      parent_query_paths_equal = (
          (left.parent_location is None and right.parent_location is None) or
          (left.parent_location.query_path == right.parent_location.query_path))
  
      recursive_scopes_depths_equal = (left.recursive_scopes_depth == right.recursive_scopes_depth)
  
      types_equal = left.type == right.type
  
      return all([
          optional_scopes_depth_equal,
          parent_query_paths_equal,
          recursive_scopes_depths_equal,
          types_equal,
      ])
docs: Return True if LocationInfo objects are equivalent for the SQL backend, False otherwise.
  
      LocationInfo objects are considered equal for the SQL backend iff the optional scopes depth,
      recursive scopes depth, types and parent query paths are equal.
  
      Args:
          left: LocationInfo, left location info object to compare.
          right: LocationInfo, right location info object to compare.
  
      Returns:
          bool, True if LocationInfo objects equivalent, False otherwise.