import re


def camel_case_to_snake_case(s):
    """Convert string in CamelCase to snake_case.
    Args:
        s (str): String in CamelCase.
    Returns:
        str: String in snake_case.
    """
    _underscorer1 = re.compile(r"(.)([A-Z][a-z]+)")
    _underscorer2 = re.compile("([a-z0-9])([A-Z])")
    subbed = _underscorer1.sub(r"\1_\2", s)
    return _underscorer2.sub(r"\1_\2", subbed).lower()