def force_attribute_same_len_if_none(obj, same_len_attributes=[], value=None):
    """Make list of None with len the same as an existing attribute

    If attributes after the first are None then make those attributes a list
    of len(first_attribute) filled with value.  This is useful when you want
    to zip each member of two attributes. If the second attribute is None,
    then any zipping is impossible.  However, if the second attribute
    is set to a list of None then zipping is possible.

    Parameters
    ----------
    obj : object
        Object that has the attributes.
    same_len_attributes : list of list of string
        For each group of attribute names, if attributes after the first are
        None then those attributes will be made a list of len(first_attribute)
        filled with `value`.
    value : obj, optional
        Value to fill each list.  Default value=None.


    """
    for group in same_len_attributes:
        a1 = getattr(obj, group[0])
        if a1 != None:
            for v in group[1:]:
                if getattr(obj, v) is None:
                    setattr(obj, v, [value] * len(a1))
