<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_drive_resource(self, drive_name):
 """Gets the DiskDrive resource if exists. :param drive_name: can be either "PhysicalDrives" or "LogicalDrives". :returns the list of drives. :raises: IloCommandNotSupportedError if the given drive resource doesn't exist. :raises: IloError, on an error from iLO. """

        disk_details_list = []
        array_uri_links = self._create_list_of_array_controllers()
        for array_link in array_uri_links:
            _, _, member_settings = (
                self._rest_get(array_link['href']))

            if ('links' in member_settings and
                    drive_name in member_settings['links']):
                disk_uri = member_settings['links'][drive_name]['href']
                headers, disk_member_uri, disk_mem = (
                    self._rest_get(disk_uri))
                if ('links' in disk_mem and
                        'Member' in disk_mem['links']):
                    for disk_link in disk_mem['links']['Member']:
                        diskdrive_uri = disk_link['href']
                        _, _, disk_details = (
                            self._rest_get(diskdrive_uri))
                        disk_details_list.append(disk_details)
                else:
                    msg = ('"links/Member" section in %s'
                           ' does not exist', drive_name)
                    raise exception.IloCommandNotSupportedError(msg)
            else:
                msg = ('"links/%s" section in '
                       ' ArrayController/links/Member does not exist',
                       drive_name)
                raise exception.IloCommandNotSupportedError(msg)
        if disk_details_list:
            return disk_details_list