import pickle


def get_ema_design(tar):
    """Retrieve the EMA workbench sampling design data."""
    ema_design = [i for i in tar.getmembers() 
                  if i.name.endswith('_ema_designs.pkl')][0]
    fdata = tar.extractfile(ema_design)
    designs = pickle.load(fdata)
    return designs