<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def choices(self):
 """ Retrieve choices from API if possible"""

        if not self._choices:
            gandi = self.gandi or GandiContextHelper()
            self._choices = self._get_choices(gandi)
            if not self._choices:
                api = gandi.get_api_connector()
                gandi.echo('Please check that you are connecting to the good '
                           "api '%s' and that it's running." % (api.host))
                sys.exit(1)

        return self._choices