<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _check_zone(self, name, create=False):
        '''Checks whether a zone specified in a source exist in Azure server.

            Note that Azure zones omit end '.' eg: contoso.com vs contoso.com.
            Returns the name if it exists.

            :param name: Name of a zone to checks
            :type  name: str
            :param create: If True, creates the zone of that name.
            :type  create: bool

            :type return: str or None
        '''
        self.log.debug('_check_zone: name=%s', name)
        try:
            if name in self._azure_zones:
                return name
            self._dns_client.zones.get(self._resource_group, name)
            self._azure_zones.add(name)
            return name
        except CloudError as err:
            msg = 'The Resource \'Microsoft.Network/dnszones/{}\''.format(name)
            msg += ' under resource group \'{}\''.format(self._resource_group)
            msg += ' was not found.'
            if msg == err.message:
                # Then the only error is that the zone doesn't currently exist
                if create:
                    self.log.debug('_check_zone:no matching zone; creating %s',
                                   name)
                    create_zone = self._dns_client.zones.create_or_update
                    create_zone(self._resource_group, name,
                                Zone(location='global'))
                    return name
                else:
                    return
            raise