@staticmethod
def host_halo_selection(return_subhalos=False, **kwargs):
    """ Method divides sample in to host halos and subhalos, and returns
        either the hosts or the hosts and the subs depending
        on the value of the input ``return_subhalos``.
        """
    table = kwargs['table']
    mask = table['halo_upid'] == -1
    if return_subhalos is False:
        return table[mask]
    else:
        return table[mask], table[~mask]
