<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_fqdn(cls, fqdn):
 """Retrieve domain id associated to a FQDN."""

        result = cls.list({'fqdn': fqdn})
        if len(result) > 0:
            return result[0]['id']