def parameterize_path(path, parameters):
    """Format a path with a provided dictionary of parameters

    Parameters
    ----------
    path : string
       Path with optional parameters, as a python format string
    parameters : dict
       Arbitrary keyword arguments to fill in the path
    """
    if parameters is None:
        parameters = {}

    try:
        return path.format(**parameters)
    except KeyError as key_error:
        raise PapermillMissingParameterException("Missing parameter {}".format(key_error))
Format a path with a provided dictionary of parameters

    Parameters
    ----------
    path : string
       Path with optional parameters, as a python format string
    parameters : dict
       Arbitrary keyword arguments to fill in the path