def create_distr_name(dep_vars=None, cond_vars=None) -> str:
    """
    Creates a name based on the given variables of a distribution and the variables it is
    conditioned on
    :param dep_vars: The random variables of a distribution. x in p(x|z)
    :param cond_vars: The conditioned-on variables of a distribution. z in p(x|z)
    :return: A string of the name.
    """
    name = ''

    if dep_vars:
        if not isinstance(dep_vars[0], list):
            name += ','.join([v.name for v in dep_vars])
        else:
            dep_vars_x = dep_vars[0]
            dep_vars_y = dep_vars[1]
            name += ','.join([v.name for v in dep_vars_x + dep_vars_y])

    if cond_vars:
        name += '|' + ','.join([v.name for v in cond_vars])

    return name