```
def find_id(input_attr_name)
     for field_id, field in enumerate(pr.fields()):
         if field.name() == input_attr_name:
             input_attr_id = field_id
             break
     if input_attr_id:
         return input_attr_id
     else:
         raise AttributeError
```