class_docstr: The ModelGraph represents the network that is being processed by hls4ml.
  
  Args:
      config (dict):  The configuration dictionary
      layer_list (list(dict)):  The list contains a dictionary for each input layer
      inputs (list, optional):  The inputs to the model. If None, determined from layer_list
      outputs (list, optional):  The outputs to the model. If None, determined from layer_list
code: def _get_top_function(self, x):
      if self._top_function_lib is None:
          raise Exception("Model not compiled")
      if len(self.get_input_variables()) == 1:
          xlist = [x]
      else:
          xlist = x
      n_outputs = len(self.get_output_variables())
  
      for xi in xlist:
          if not isinstance(xi, np.ndarray):
              raise Exception(
                  f"Expected numpy.ndarray, but got {type(x)}"
              )
          if not xi.flags["C_CONTIGUOUS"]:
              raise Exception(
                  "Array must be c_contiguous, try using numpy.ascontiguousarray(x)"
              )
  
      x0 = xlist[0]
      if x0.dtype in [np.single, np.float32]:
          top_function = getattr(
              self._top_function_lib,
              self.config.get_project_name() + "_float",
          )
          ctype = ctypes.c_float
      elif x0.dtype in [np.double, np.float64, np.float_]:
          top_function = getattr(
              self._top_function_lib,
              self.config.get_project_name() + "_double",
          )
          ctype = ctypes.c_double
      else:
          raise Exception(
              "Invalid type ({}) of numpy array. Supported types are: single, float32, double, float64, float_.".format(
                  x0.dtype
              )
          )
  
      top_function.restype = None
      top_function.argtypes = [
          npc.ndpointer(ctype, flags="C_CONTIGUOUS")
          for i in range(len(xlist) + n_outputs)
      ]
  
      return top_function, ctype
  
imports: import ctypes
  import os
  import platform
  from collections import OrderedDict
  import numpy
  import numpy.ctypeslib
  from hls4ml.backends import get_backend
  from hls4ml.model.flow import get_flow
  from hls4ml.model.layers import layer_map
  from hls4ml.model.optimizer import get_available_passes, optimize_model
label_desc: Use image node_id 21 for calling the ModelGraph obj's underlying member method code with example usage: obj._get_top_function(x) and returns: top_function,  ctype