import re


def is_snake_case(test_string):
    """
    test if a string is in 'snake_case'
    """
    ptrn = "(^[a-z])([a-z0-9]+_?[a-z0-9]?)+([a-z0-9]$)"
    res = re.search(ptrn, test_string)
    return bool(res)