def METHOD_NAME(
    api: TensorboardClientWithOverride, experiment_name: str
) -> str:
    """Creates a tensorboard experiment.
    Args:
        api (TensorboardClientWithOverride):
            Required. An api for interfacing with tensorboard resources.
        experiment_name (str):
            Required. The name of the experiment to get or create.
    Returns:
        The name of the experiment.
    """
    tb_experiment = tensorboard_experiment.TensorboardExperiment()
    try:
        experiment = api.create_tensorboard_experiment(
            parent=training_utils.environment_variables.tensorboard_resource_name,
            tensorboard_experiment=tb_experiment,
            tensorboard_experiment_id=experiment_name,
        )
    except exceptions.AlreadyExists:
        logger.info("Creating experiment failed. Retrieving experiment.")
        experiment_name = os.path.join(
            training_utils.environment_variables.tensorboard_resource_name,
            "experiments",
            experiment_name,
        )
        experiment = api.get_tensorboard_experiment(name=experiment_name)
    return experiment.name