<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _find_element_text(element, match, default=None):
 """Find a matching subelement and return its text. If default is given, return it if a matching subelement is not found. Otherwise, ValueError is raised. """

    child = element.find(match)
    try:
        return child.text
    except AttributeError:
        if default is not None:
            return default
        else:
            raise MissingElementError(element, match)