def is_multivalued(value):
    """
    Determine whether the given value should be treated as a sequence
    of multiple values when used as a request parameter.

    In general anything that is iterable is multivalued.  For example,
    `list` and `tuple` instances are multivalued.  Generators are
    multivalued, as are the iterable objects returned by `zip`,
    `itertools.chain`, etc.  However, a simple `int` is single-valued.
    `str` and `bytes` are special cases: although these are iterable,
    we treat each as a single value rather than as a sequence of
    isolated characters or bytes.
    """

    # special cases: iterable, but not multivalued
    if isinstance(value, (string_types, binary_type)):
        return False

    # general rule: multivalued if iterable
    return isinstance(value, Iterable)
Determine whether the given value should be treated as a sequence
    of multiple values when used as a request parameter.

    In general anything that is iterable is multivalued.  For example,
    `list` and `tuple` instances are multivalued.  Generators are
    multivalued, as are the iterable objects returned by `zip`,
    `itertools.chain`, etc.  However, a simple `int` is single-valued.
    `str` and `bytes` are special cases: although these are iterable,
    we treat each as a single value rather than as a sequence of
    isolated characters or bytes.