def METHOD_NAME(attr: cst.Attribute) -> list[str]:
    if m.matches(attr, m.Attribute(value=m.Name(), attr=m.Name())):
        return [attr.value.value, attr.attr.value]
    if m.matches(attr, m.Attribute(value=m.Attribute(), attr=m.Name())):
        return METHOD_NAME(attr.value) + [attr.attr.value]
    raise ValueError("unexpected attr format")