code: def nasbench_format_to_architecture_repr(adjacency_matrix, labeling):
      """
      Computes a graph-invariance MD5 hash of the matrix and label pair.
      Imported from NAS-Bench-101 repo.
  
      Parameters
      ----------
      adjacency_matrix : np.ndarray
          A 2D array of shape NxN, where N is the number of vertices.
          ``matrix[u][v]`` is 1 if there is a direct edge from `u` to `v`,
          otherwise it will be 0.
      labeling : list of str
          A list of str that starts with input and ends with output. The intermediate
          nodes are chosen from candidate operators.
  
      Returns
      -------
      tuple and int and dict
          Converted number of vertices and architecture.
      """
      num_vertices = adjacency_matrix.shape[0]
      assert len(labeling) == num_vertices
      architecture = {}
      for i in range(1, num_vertices - 1):
          architecture["op{}".format(i)] = labeling[i]
          assert labeling[i] not in [INPUT, OUTPUT]
      for i in range(1, num_vertices):
          architecture["input{}".format(i)] = [
              k for k in range(i) if adjacency_matrix[k, i]
          ]
      return num_vertices, architecture
  
file_path: nni/nni/nas/benchmark/nasbench101/graph_util.py
imports: import hashlib
  import numpy
  from .constants import INPUT, LABEL2ID, OUTPUT
label_desc: Use image node_id 3 for calling a global function with example usage: nasbench_format_to_architecture_repr(adjacency_matrix, labeling) and returns: num_vertices,  architecture