(exp_name, experiments)
return in_experiment, source
Check if we are in a given experiment.

  Args:
    exp_name: str, name of experiment
    experiments: dict, dictionary of experiments
  Returns:
    tuple of bool, if host in exp_name, and str, source of experiment status
Check if we are in a given experiment.
Check if we are in a given experiment .
def InExperiment(exp_name, experiments):
  """Check if we are in a given experiment.

  Args:
    exp_name: str, name of experiment
    experiments: dict, dictionary of experiments
  Returns:
    tuple of bool, if host in exp_name, and str, source of experiment status
  """
  in_experiment = False
  source = 'unknown'
  knobs = KNOBS.Knobs()
  track = gmacpyutil.GetTrack()

  if experiments:
    try:
      retval = GetExperimentStatus(exp_name, knobs, experiments, track=track)
      if retval.status == ENABLED:
        in_experiment = True
      source = retval.source
    except (InvalidExperiment, MissingUUID):
      pass
  return in_experiment, source
def InExperiment ( exp_name , experiments ) : in_experiment = False source = 'unknown' knobs = KNOBS . Knobs ( ) track = gmacpyutil . GetTrack ( ) if experiments : try : retval = GetExperimentStatus ( exp_name , knobs , experiments , track = track ) if retval . status == ENABLED : in_experiment = True source = retval . source except ( InvalidExperiment , MissingUUID ) : pass return in_experiment , source