class_docstr: There are the steps how the TF2Loader loads and converts the TF2 model
  1. Get the concrete functions from the Keras model (only 1 concrete function is supported now)
  2. Get the tensorflow graphdef from the concrete function by doing
     (a) calling tensorflow's convert_variables_to_constants_v2 API to freeze variables into constants
     (b) run grappler optimizations on the graphdef ("constfold", "dependency", "debug_stripper")
  3. Extract sub graph based on "outputs"
  4. Construct tfssa IR from graphdef
  5. Run tfssa graph passes
  6. Convert tfssa to program by TF2Converter
class_docstr_tok: ["There","are","the","steps","how","the","TF2Loader","loads","and","converts","the","TF2","model","1",".","Get","the","concrete","functions","from","the","Keras","model","(","only","1","concrete","function","is","supported","now",")","2",".","Get","the","tensorflow","graphdef","from","the","concrete","function","by","doing","(","a",")","calling","tensorflow","'s","convert_variables_to_constants_v2","API","to","freeze","variables","into","constants","(","b",")","run","grappler","optimizations","on","the","graphdef","(","``","constfold","''",",","``","dependency","''",",","``","debug_stripper","''",")","3",".","Extract","sub","graph","based","on","``","outputs","''","4",".","Construct","tfssa","IR","from","graphdef","5",".","Run","tfssa","graph","passes","6",".","Convert","tfssa","to","program","by","TF2Converter"]
code: def _get_concrete_functions_and_graph_def(self):
      if not isinstance(
          self.model,
          (list, str, _tf.keras.Model, _tf.compat.v1.GraphDef),
      ):
          raise NotImplementedError(
              f"Expected model format: [SavedModel | concrete_function | "
              f"tf.keras.Model | .h5 | GraphDef], got {self.model}"
          )
  
      cfs = []
      if isinstance(self.model, list):
          cfs = self.model
      if isinstance(self.model, _tf.keras.Model):
          cfs = self._concrete_fn_from_tf_keras(self.model)
      elif isinstance(self.model, _tf.compat.v1.GraphDef):
          return None, self.model
      elif isinstance(self.model, str):
          if not _os_path.exists(self.model):
              raise ValueError(
                  f'Input model "{self.model}" does not exist'
              )
          elif _os_path.isfile(self.model) and (
              self.model.endswith(".h5") or self.model.endswith(".hdf5")
          ):
              # Keep a reference to loaded model, or it errors out due to variables deletion, see
              # https://github.com/tensorflow/tensorflow/issues/37615#issuecomment-1552237114.
              keras_model = _tf.keras.models.load_model(self.model)
              cfs = self._concrete_fn_from_tf_keras(keras_model)
          elif _os_path.isdir(self.model):
              saved_model = _tf.saved_model.load(self.model)
              sv = saved_model.signatures.values()
              cfs = sv if isinstance(sv, list) else list(sv)
          else:
              raise ValueError(
                  f"Input model path should be .h5/.hdf5 file or a directory, but "
                  f"got {self.model}"
              )
  
      graph_def = self._graph_def_from_concrete_fn(cfs)
  
      return cfs, graph_def
  
imports: import os.path
  from distutils.version import StrictVersion
  import tensorflow
  from tensorflow.lite.python.util import get_grappler_config
  from tensorflow.lite.python.util import run_graph_optimizations
  from tensorflow.python.eager import context
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework.convert_to_constants import convert_variables_to_constants_v2
  from tensorflow.python.framework.function_def_to_graph import function_def_to_graph
  from tensorflow.python.keras.saving import saving_utils
  from tqdm import tqdm
  from coremltools import _logger
  from coremltools._deps import _get_version
  from coremltools.converters.mil.frontend.tensorflow2.tf_graph_pass import flatten_sub_graph_namespaces, rewrite_control_flow_functions
  from coremltools.converters.mil.frontend.tensorflow.basic_graph_ops import fill_outputs
  from coremltools.converters.mil.frontend.tensorflow.load import TFLoader
  from coremltools.converters.mil.frontend.tensorflow.parsed_tf_node import ParsedTFNode
  from coremltools.converters.mil.frontend.tensorflow.tf_graph_pass import constant_propagation, delete_disconnected_nodes, delete_unnecessary_constant_nodes, fuse_dilation_conv, insert_get_tuple, remove_variable_nodes, tensor_array_resource_removal
  from coremltools.converters.mil.frontend.tensorflow.tfssa import NetworkEnsemble, SSAFunction
  from coremltools.converters.mil.input_types import TensorType
  from .converter import TF2Converter
label_desc: Use image node_id 2 for calling the TF2Loader obj's underlying member method code with example usage: obj._get_concrete_functions_and_graph_def() and returns: cfs,  graph_def, None,  self