<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def maybe_specialize(term, domain):
 """Specialize a term if it's loadable. """

    if isinstance(term, LoadableTerm):
        return term.specialize(domain)
    return term