def to_resolvers(sweepable: Sweepable) -> List[ParamResolver]:
    """Convert a Sweepable to a list of ParamResolvers."""
    if isinstance(sweepable, ParamResolver):
        return [sweepable]
    elif isinstance(sweepable, Sweep):
        return list(sweepable)
    elif isinstance(sweepable, collections.Iterable):
        iterable = cast(collections.Iterable, sweepable)
        return list(iterable) if isinstance(next(iter(iterable)),
                                            ParamResolver) else sum(
            [list(s) for s in iterable], [])
    raise TypeError('Unexpected Sweepable type.')