def METHOD_NAME(submission, registration_attribute: str, component_attribute: str):
    for component in submission.form.iter_components(recursive=True):
        attribute = glom(component, component_attribute, default=None)
        if attribute == registration_attribute:
            return component