def get_es_master(es_algorithm, logger, log_dir,
                  stubs, bucket, experiment_name, credential):
    """Instantiate an evolution strategic algorithm master.

    Return an ES algorithm master from the algorithms package.

    Args:
        es_algorithm: algorithms.*. ES algorithm.
        logger: logging.Logger. Logger.
        log_dir: str. Log directory.
        stubs: list. grpc stubs.
        bucket: str. GCS bucket name.
        experiment_name: str. Experiment name.
        credential: str. Credential JSON file path.
    Returns:
            algorithms.*Master.
        """

    return es_algorithm(
        logger=logger,
        log_dir=log_dir,
        workers=stubs,
        bucket_name=bucket,
        experiment_name=experiment_name,
        credential_json=credential,
    )