code: def guess_inputs(input_dir):
      meta_candidates = []
      model_candidates = []
      for path in os.listdir(input_dir):
          if path.startswith("graph-") and path.endswith(".meta"):
              meta_candidates.append(path)
          if path.startswith("model-") and path.endswith(".index"):
              modelid = int(path[len("model-") : -len(".index")])
              model_candidates.append((path, modelid))
      assert len(meta_candidates)
      meta = sorted(meta_candidates)[-1]
      if len(meta_candidates) > 1:
          logger.info(
              "Choosing {} from {} as graph file.".format(
                  meta, meta_candidates
              )
          )
      else:
          logger.info("Choosing {} as graph file.".format(meta))
  
      assert len(model_candidates)
      model = sorted(model_candidates, key=lambda x: x[1])[-1][0]
      if len(model_candidates) > 1:
          logger.info(
              "Choosing {} from {} as model file.".format(
                  model, [x[0] for x in model_candidates]
              )
          )
      else:
          logger.info("Choosing {} as model file.".format(model))
      return os.path.join(input_dir, model), os.path.join(
          input_dir, meta
      )
  
file_path: tensorpack/scripts/dump-model-params.py
imports: import argparse
  import numpy
  import os
  import six
  import tensorflow
  from tensorpack import logger
  from tensorpack.tfutils import varmanip
  from tensorpack.tfutils.common import get_op_tensor_name, get_tf_version_tuple
label_desc: Use image node_id 2 for calling a global function with example usage: guess_inputs(input_dir) and returns: os,  os