parameters: (
      old_adj_list: Optional[Sequence[openr_types.Adjacency]],
      new_adj_list: Optional[Sequence[openr_types.Adjacency]],
      tags: Optional[Sequence[str]] = None,
  )
return_statement: return delta_list
docstring: given the old adj list and the new one for some node, return
      change list.
  
      :param old_adj_list [Adjacency]: old adjacency list
      :param new_adj_list [Adjacency]: new adjacency list
      :param tags 3-tuple(string): a tuple of labels for
          (in old only, in new only, in both but different)
  
      :return [(str, Adjacency, Adjacency)]: list of tuples of
          (changeType, oldAdjacency, newAdjacency)
          in the case where an adjacency is added or removed,
          oldAdjacency or newAdjacency is None, respectively
docstring_summary: given the old adj list and the new one for some node, return
      change list.
docstring_tokens: given the old adj list and the new one for some node return change list .
function: def find_adj_list_deltas(
      old_adj_list: Optional[Sequence[openr_types.Adjacency]],
      new_adj_list: Optional[Sequence[openr_types.Adjacency]],
      tags: Optional[Sequence[str]] = None,
  ) -> List:
      """given the old adj list and the new one for some node, return
      change list.
  
      :param old_adj_list [Adjacency]: old adjacency list
      :param new_adj_list [Adjacency]: new adjacency list
      :param tags 3-tuple(string): a tuple of labels for
          (in old only, in new only, in both but different)
  
      :return [(str, Adjacency, Adjacency)]: list of tuples of
          (changeType, oldAdjacency, newAdjacency)
          in the case where an adjacency is added or removed,
          oldAdjacency or newAdjacency is None, respectively
      """
      if not tags:
          tags = ("NEIGHBOR_DOWN", "NEIGHBOR_UP", "NEIGHBOR_UPDATE")
  
      if old_adj_list is None:
          old_adj_list = set()
      if new_adj_list is None:
          new_adj_list = set()
  
      old_neighbors = {(a.otherNodeName, a.ifName) for a in old_adj_list}
      new_neighbors = {(a.otherNodeName, a.ifName) for a in new_adj_list}
      delta_list = [
          (tags[0], a, None)
          for a in old_adj_list
          if (a.otherNodeName, a.ifName) in old_neighbors - new_neighbors
      ]
      delta_list.extend(
          [
              (tags[1], None, a)
              for a in new_adj_list
              if (a.otherNodeName, a.ifName) in new_neighbors - old_neighbors
          ]
      )
      delta_list.extend(
          [
              (tags[2], a, b)
              for a, b in product(old_adj_list, new_adj_list)
              if (
                  a.otherNodeName == b.otherNodeName
                  and a.ifName == b.ifName
                  and (a.otherNodeName, a.ifName) in new_neighbors & old_neighbors
                  and a != b
              )
          ]
      )
      return delta_list
function_tokens: def find_adj_list_deltas ( old_adj_list : Optional [ Sequence [ openr_types . Adjacency ] ] , new_adj_list : Optional [ Sequence [ openr_types . Adjacency ] ] , tags : Optional [ Sequence [ str ] ] = None , ) -> List : if not tags : tags = ( "NEIGHBOR_DOWN" , "NEIGHBOR_UP" , "NEIGHBOR_UPDATE" ) if old_adj_list is None : old_adj_list = set ( ) if new_adj_list is None : new_adj_list = set ( ) old_neighbors = { ( a . otherNodeName , a . ifName ) for a in old_adj_list } new_neighbors = { ( a . otherNodeName , a . ifName ) for a in new_adj_list } delta_list = [ ( tags [ 0 ] , a , None ) for a in old_adj_list if ( a . otherNodeName , a . ifName ) in old_neighbors - new_neighbors ] delta_list . extend ( [ ( tags [ 1 ] , None , a ) for a in new_adj_list if ( a . otherNodeName , a . ifName ) in new_neighbors - old_neighbors ] ) delta_list . extend ( [ ( tags [ 2 ] , a , b ) for a , b in product ( old_adj_list , new_adj_list ) if ( a . otherNodeName == b . otherNodeName and a . ifName == b . ifName and ( a . otherNodeName , a . ifName ) in new_neighbors & old_neighbors and a != b ) ] ) return delta_list