def METHOD_NAME(name):
    to_match = {'attr1': 1, 'attr2': 2, 'attr3': 3}
    x = MyObj()
    x.myattr = name
    match to_match:
        case {x.myattr: dyn_match, **data}:
            return forward(dyn_match=dyn_match, **data)