<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_domains(self):
 """Retrieves available domains. Returns: :py:obj:`list` of :py:class:`~.rest_primitives.Domain`: List of available domains """

        # Domains are fixed and actually only one per REST api.
        if self._domains is None:
            self._domains = self._get_elements('domains', Domain)
        return self._domains