def format_multipart(props):
    """ Flatten lists to fit the requrests multipart form data format """
    ret = []
    for k, v in props.items():
        if type(v) == list:
            for item in v:
                ret.append((k, item))
        else:
            ret.append((k, v))
    return tuple(ret)