@staticmethod
def _state_to_drugstr(s, sb=None):
    """Converts state (e.g., [1,1,0]) to drug-string (e.g., "2,3")
        """
    if s.count(1) == 0:
        return 0
    n = len(s)
    snums = []
    for i in range(n):
        if s[n - i - 1] == 1:
            snums.append(str(i + 1))
    if sb is None:
        return ','.join(snums)
    sbnums = []
    for i in range(n):
        if sb[n - i - 1] == 1:
            sbnums.append(str(i + 1))
    sbnums = [i for i in sbnums if not i in snums]
    return ','.join(snums), ','.join(sbnums)
