def METHOD_NAME(self, tr_id, te_id):
    """
    For static DG task, get train and test domains list.
    :param tr_id: training domain ids;
        int or str, or a list of int or str, or None;
        if None, then assumed to be the complement of te_id.
    :param te_id: test domain ids;
        int or str, or a list of int or str; required.
    :return: list of training domain names, list of test domain names.
    """
    list_domains = self.get_list_domains()
    list_domain_te = parse_domain_id(te_id, list_domains)
    assert set(list_domain_te).issubset(set(list_domains))
    if tr_id is None:
        list_domain_tr = [did for did in list_domains if
                          did not in list_domain_te]
    else:
        list_domain_tr = parse_domain_id(tr_id, list_domains)
    if not set(list_domain_tr).issubset(set(list_domains)):
        raise RuntimeError(
            f"training domain {list_domain_tr} is not \
            subset of available domains {list_domains}")
    if set(list_domain_tr) & set(list_domain_te):
        logger = Logger.get_logger()
        logger.warn(
            "The sets of training and test domains overlap -- "
            "be aware of data leakage or training to the test!"
        )
        warnings.warn(
            "The sets of training and test domains overlap -- "
            "be aware of data leakage or training to the test!",
            RuntimeWarning
        )
    self.dim_d_tr = len(list_domain_tr)
    self._list_domain_tr = list_domain_tr
    return list_domain_tr, list_domain_te