def experiment(base_url: str, experiment_id: str=None) ->str:
    """
    Build the URL for an experiment to be published to.
    """
    if not experiment_id:
        return '/'.join([base_url, 'experiments'])
    return '/'.join([base_url, 'experiments', experiment_id])
