parameters: (
          self,
          key: str,
          value: Any,
          kvstore_adj_node_names: Set,
          decision_adj_dbs: Sequence[openr_types.AdjacencyDatabase],
          json: bool,
      )
return_statement: return return_code
docstring: Returns status code. 0 = success, 1 = failure
docstring_summary: Returns status code. 0 = success, 1 = failure
docstring_tokens: Returns status code . 0 = success 1 = failure
function: def print_db_delta_adj(
          self,
          key: str,
          value: Any,
          kvstore_adj_node_names: Set,
          decision_adj_dbs: Sequence[openr_types.AdjacencyDatabase],
          json: bool,
      ) -> int:
          """Returns status code. 0 = success, 1 = failure"""
  
          kvstore_adj_db = deserialize_thrift_object(
              value.value, openr_types.AdjacencyDatabase
          )
          node_name = kvstore_adj_db.thisNodeName
          kvstore_adj_node_names.add(node_name)
          if node_name not in {db.thisNodeName for db in decision_adj_dbs}:
              print(
                  printing.render_vertical_table(
                      [[f"node {node_name}'s adj db is missing in Decision"]]
                  )
              )
              return 1
  
          decision_adj_db = openr_types.AdjacencyDatabase()
          for db in decision_adj_dbs:
              if db.thisNodeName == node_name:
                  decision_adj_db = db
  
          return_code = 0
          if json:
              tags = ("in_decision", "in_kvstore", "changed_in_decision_and_kvstore")
              adj_list_deltas = utils.find_adj_list_deltas(
                  decision_adj_db.adjacencies, kvstore_adj_db.adjacencies, tags=tags
              )
              deltas_json, return_code = utils.adj_list_deltas_json(
                  adj_list_deltas, tags=tags
              )
              if return_code:
                  utils.print_json(deltas_json)
          else:
              lines = utils.sprint_adj_db_delta(kvstore_adj_db, decision_adj_db)
              if lines:
                  print(
                      printing.render_vertical_table(
                          [
                              [
                                  f"node {node_name}'s adj db in Decision out of "
                                  "sync with KvStore's"
                              ]
                          ]
                      )
                  )
                  print("\n".join(lines))
                  return_code = 1
  
          return return_code
function_tokens: def print_db_delta_adj ( self , key : str , value : Any , kvstore_adj_node_names : Set , decision_adj_dbs : Sequence [ openr_types . AdjacencyDatabase ] , json : bool , ) -> int : kvstore_adj_db = deserialize_thrift_object ( value . value , openr_types . AdjacencyDatabase ) node_name = kvstore_adj_db . thisNodeName kvstore_adj_node_names . add ( node_name ) if node_name not in { db . thisNodeName for db in decision_adj_dbs } : print ( printing . render_vertical_table ( [ [ f"node {node_name}'s adj db is missing in Decision" ] ] ) ) return 1 decision_adj_db = openr_types . AdjacencyDatabase ( ) for db in decision_adj_dbs : if db . thisNodeName == node_name : decision_adj_db = db return_code = 0 if json : tags = ( "in_decision" , "in_kvstore" , "changed_in_decision_and_kvstore" ) adj_list_deltas = utils . find_adj_list_deltas ( decision_adj_db . adjacencies , kvstore_adj_db . adjacencies , tags = tags ) deltas_json , return_code = utils . adj_list_deltas_json ( adj_list_deltas , tags = tags ) if return_code : utils . print_json ( deltas_json ) else : lines = utils . sprint_adj_db_delta ( kvstore_adj_db , decision_adj_db ) if lines : print ( printing . render_vertical_table ( [ [ f"node {node_name}'s adj db in Decision out of " "sync with KvStore's" ] ] ) ) print ( "\n" . join ( lines ) ) return_code = 1 return return_code