import re


def class_name_to_kw_arg(class_name):
    """'ClassName' -> 'class_name'"""
    first_pass = re.sub(r'([a-z])([A-Z0-9])', r'\1_\2', class_name)
    second_pass = re.sub(r'([0-9])([a-zA-Z])', r'\1_\2', first_pass).lower()
    return second_pass.replace('v2_', '')