def copy_opts_for_single_ifo(opt, ifo):
    """
    Takes the namespace object (opt) from the multi-detector interface and
    returns a namespace object for a single ifo that can be used with
    functions expecting output from the single-detector interface.
    """
    opt = copy.deepcopy(opt)
    for arg, val in vars(opt).items():
        if isinstance(val, DictWithDefaultReturn):
            setattr(opt, arg, getattr(opt, arg)[ifo])
    return opt
def copy_opts_for_single_ifo ( opt , ifo ) : opt = copy . deepcopy ( opt ) for arg , val in vars ( opt ) . items ( ) : if isinstance ( val , DictWithDefaultReturn ) : setattr ( opt , arg , getattr ( opt , arg ) [ ifo ] ) return opt
Takes the namespace object (opt) from the multi-detector interface and
    returns a namespace object for a single ifo that can be used with
    functions expecting output from the single-detector interface.