class_docstr: Use mlflow to implement ExpManager.
docstr: Method for getting or creating an experiment. It will try to first get a valid experiment, if exception occurs, it will
  raise errors.
code: def _get_exp(self, experiment_id=None, experiment_name=None):
      """
      Method for getting or creating an experiment. It will try to first get a valid experiment, if exception occurs, it will
      raise errors.
      """
      assert (
          experiment_id is not None or experiment_name is not None
      ), "Please input at least one of experiment/recorder id or name before retrieving experiment/recorder."
      if experiment_id is not None:
          try:
              # NOTE: the mlflow's experiment_id must be str type...
              # https://www.mlflow.org/docs/latest/python_api/mlflow.tracking.html#mlflow.tracking.MlflowClient.get_experiment
              exp = self.client.get_experiment(experiment_id)
              if exp.lifecycle_stage.upper() == "DELETED":
                  raise MlflowException(
                      "No valid experiment has been found."
                  )
              experiment = MLflowExperiment(
                  exp.experiment_id, exp.name, self.uri
              )
              return experiment
          except MlflowException as e:
              raise ValueError(
                  "No valid experiment has been found, please make sure the input experiment id is correct."
              ) from e
      elif experiment_name is not None:
          try:
              exp = self.client.get_experiment_by_name(experiment_name)
              if (
                  exp is None
                  or exp.lifecycle_stage.upper() == "DELETED"
              ):
                  raise MlflowException(
                      "No valid experiment has been found."
                  )
              experiment = MLflowExperiment(
                  exp.experiment_id, experiment_name, self.uri
              )
              return experiment
          except MlflowException as e:
              raise ValueError(
                  "No valid experiment has been found, please make sure the input experiment name is correct."
              ) from e
  
imports: from urllib.parse import urlparse
  import mlflow
  from filelock import FileLock
  from mlflow.exceptions import MlflowException, RESOURCE_ALREADY_EXISTS, ErrorCode
  from mlflow.entities import ViewType
  import os
  from typing import Optional, Text
  from .exp import MLflowExperiment, Experiment
  from ..config import C
  from .recorder import Recorder
  from ..log import get_module_logger
  from ..utils.exceptions import ExpAlreadyExistError
label_desc: Use image node_id 5 for calling the MLflowExpManager obj's underlying member method code with example usage: obj._get_exp(experiment_id, experiment_name) and returns: experiment, experiment