def get_partitioner_dict(*modules):
    """
    Given a list of modules which have a `partition` function and
    optionally a `name` variable, return a dictionary that maps
    `name` -> `partition` for any modules that have a `name`.

    This allows for partitioner modules to specify a standardized
    name by which they can be referenced.
    """
    partitioners = {}
    for m in modules:
        if name := getattr(m, 'name', None):
            partitioners[name] = m
    return partitioners