def update_namespace(D, *attributes):
    """ Add arbitrary attributes to a :class: `Namespace <argparse.Namespace>`.

    ==========  ================================================================
    D           argparse.Namespace; the namespace holding the data and 
                metadata. The format is the same as what is returned by a 
                dataloader.
    attributes  tuples or len(2) lists; (name, value) pairs of the attributes 
                to add. Where `name` is a str and value any python object.
    ==========  ================================================================
    """
    for name, attribute in attributes:
        D.__dict__.update({name: attribute})
