code: def allocate_graph_structures(n, m, use_arc_mixing=True):
      # Size bipartite graph
      n_nodes = n + m
      n_arcs = n * m
  
      # Resize vectors
      all_node_num = n_nodes + 1
      max_arc_num = n_arcs + 2 * n_nodes
      root = n_nodes
  
      source = np.zeros(max_arc_num, dtype=np.uint16)
      target = np.zeros(max_arc_num, dtype=np.uint16)
      cost = np.ones(max_arc_num, dtype=np.float64)
      supply = np.zeros(all_node_num, dtype=np.float64)
      flow = np.zeros(max_arc_num, dtype=np.float64)
      pi = np.zeros(all_node_num, dtype=np.float64)
  
      parent = np.zeros(all_node_num, dtype=np.int32)
      pred = np.zeros(all_node_num, dtype=np.int32)
      forward = np.zeros(all_node_num, dtype=np.bool_)
      thread = np.zeros(all_node_num, dtype=np.int32)
      rev_thread = np.zeros(all_node_num, dtype=np.int32)
      succ_num = np.zeros(all_node_num, dtype=np.int32)
      last_succ = np.zeros(all_node_num, dtype=np.int32)
      state = np.zeros(max_arc_num, dtype=np.int8)
  
      if use_arc_mixing:
          # Store the arcs in a mixed order
          k = max(np.int32(np.sqrt(n_arcs)), 10)
          mixing_coeff = k
          subsequence_length = (n_arcs // mixing_coeff) + 1
          num_big_subsequences = n_arcs % mixing_coeff
          num_total_big_subsequence_numbers = (
              subsequence_length * num_big_subsequences
          )
  
          i = 0
          j = 0
          for a in range(n_arcs - 1, -1, -1):
              source[i] = n_nodes - (a // m) - 1
              target[i] = n_nodes - ((a % m) + n) - 1
              i += k
              if i >= n_arcs:
                  j += 1
                  i = j
  
      else:
          # dummy values
          subsequence_length = 0
          mixing_coeff = 0
          num_big_subsequences = 0
          num_total_big_subsequence_numbers = 0
          # Store the arcs in the original order
          i = 0
          for a in range(n_arcs - 1, -1, -1):
              source[i] = n_nodes - (a // m) - 1
              target[i] = n_nodes - ((a % m) + n) - 1
              i += 1
  
      node_arc_data = NodeArcData(
          cost, supply, flow, pi, source, target
      )
      spanning_tree = SpanningTree(
          parent,
          pred,
          thread,
          rev_thread,
          succ_num,
          last_succ,
          forward,
          state,
          root,
      )
      graph = DiGraph(
          n_nodes,
          n_arcs,
          n,
          m,
          use_arc_mixing,
          num_total_big_subsequence_numbers,
          subsequence_length,
          num_big_subsequences,
          mixing_coeff,
      )
  
      return node_arc_data, spanning_tree, graph
  
imports: import numpy
  import numba
  from collections import namedtuple
  from enum import Enum, IntEnum
label_desc: Use image node_id 10 for calling a global function with example usage: allocate_graph_structures(n, m, use_arc_mixing) and returns: node_arc_data,  spanning_tree,  graph