code: def _convert_1d_to_2d(num_units: int):
      # find divisors of num_units.
      divisors = []
      for i in range(1, num_units + 1):
          q = num_units / i
          if int(q) == q:
              divisors.append(i)
      divisors = list(reversed(divisors))
      pairs = []
      for d in divisors:
          for e in divisors[1:]:
              if d * e == num_units:
                  pairs.append((d, e))
      if len(pairs) == 0:
          return num_units, 1
      # square x*y == rectangle x*y but minimizes x+y.
      close_to_square_id = int(
          np.argmin(np.sum(np.array(pairs), axis=1))
      )
      return pairs[close_to_square_id]
  
imports: import json
  import os
  from collections import OrderedDict
  import numpy
  import tensorflow
  import tensorflow.keras.backend
  from tensorflow.keras import Sequential
  from tensorflow.keras.models import Model
label_desc: Use image node_id 2 for calling a global function with example usage: _convert_1d_to_2d(num_units) and returns: pairs, num_units,  int