Decorator that transforms the decorated function into a chi.Experiment
  :param start_chiboard:
  :param f:
  :param local_dependencies:
  :return:

def experiment(f=None, local_dependencies=None, start_chiboard=True, default_logdir=""):
  """
  Decorator that transforms the decorated function into a chi.Experiment
  :param start_chiboard:
  :param f:
  :param local_dependencies:
  :return:
  """
  if not f:
    return lambda f: experiment(f, local_dependencies, start_chiboard, default_logdir)
  else:
    if sys.modules[f.__module__].__name__ == '__main__':
      a = Experiment(f, local_dependencies, start_chiboard, default_logdir)
      a.parse_args_and_run()

    return Experiment(f, local_dependencies, start_chiboard, default_logdir).run