Attempts to get an IOOS definition from a list of xml elements

def get_named_by_definition(cls, element_list, string_def):
        """Attempts to get an IOOS definition from a list of xml elements"""
        try:
            return next(
                (
                    st.value
                    for st in element_list
                    if st.definition == string_def
                )
            )
        except Exception:
            return None