def METHOD_NAME(self):
    """
    Parse tensorflow models: checkpoints, saved models, and single frozen pb file.
    Returns
    -------
    GraphDef of the passed model
    """
    graph = None
    if os.path.isdir(self._model_dir):
        ckpt = os.path.join(self._model_dir, "checkpoint")
        if not os.path.isfile(ckpt):
            if not os.path.isdir(os.path.join(self._model_dir, "variables")):
                raise RuntimeError("InputConfiguration: Invalid model path.")
            graph = self._load_saved_model()
        else:
            graph = self._load_ckpt()
    elif os.path.isfile(self._model_dir):
        # Only .pb or .pbtxt is a valid suffix name.
        if self._model_dir.endswith(".pb") or self._model_dir.endswith(".pbtxt"):
            cur_dir = os.path.dirname(self._model_dir)
        else:
            raise RuntimeError("InputConfiguration: Invalid model format.")
        # It is a saved model if `variables` directory is present at the
        # same directory with the pb or pbtxt file.
        if os.path.isdir(os.path.join(cur_dir, "variables")):
            self._model_dir = cur_dir
            graph = self._load_saved_model()
        else:
            graph = self._load_pb_file()
    else:
        raise RuntimeError("InputConfiguration: Unrecognized model " "file or path.")
    self._set_graph(graph)
    return graph