def _combine_localized_attributes(pvsystem=None, location=None, **kwargs):
    """
    Get and combine attributes from the pvsystem and/or location
    with the rest of the kwargs.
    """
    if pvsystem is not None:
        pv_dict = pvsystem.__dict__
    else:
        pv_dict = {}
    if location is not None:
        loc_dict = location.__dict__
    else:
        loc_dict = {}
    new_kwargs = dict(list(pv_dict.items()) + list(loc_dict.items()) + list
        (kwargs.items()))
    return new_kwargs
