code: def select_inst_coll(
      self,
      cloud,
      machine_type,
      preemptible,
      worker_type,
      req_cores_mcpu,
      req_memory_bytes,
      req_storage_bytes,
  ):
      if worker_type is not None and machine_type is None:
          result = self.select_pool_from_worker_type(
              cloud=cloud,
              worker_type=worker_type,
              cores_mcpu=req_cores_mcpu,
              memory_bytes=req_memory_bytes,
              storage_bytes=req_storage_bytes,
              preemptible=preemptible,
          )
      elif worker_type is None and machine_type is None:
          result = self.select_pool_from_cost(
              cloud=cloud,
              cores_mcpu=req_cores_mcpu,
              memory_bytes=req_memory_bytes,
              storage_bytes=req_storage_bytes,
              preemptible=preemptible,
          )
      else:
          assert machine_type and machine_type in valid_machine_types(
              cloud
          )
          assert worker_type is None
          result = self.select_job_private(
              cloud=cloud,
              machine_type=machine_type,
              storage_bytes=req_storage_bytes,
          )
      return (result, None)
  
imports: import asyncio
  import logging
  from typing import Dict, Optional, Tuple
  from gear import Database
  from .cloud.azure.instance_config import AzureSlimInstanceConfig
  from .cloud.azure.resource_utils import azure_worker_properties_to_machine_type
  from .cloud.gcp.instance_config import GCPSlimInstanceConfig
  from .cloud.gcp.resource_utils import GCP_MACHINE_FAMILY, family_worker_type_cores_to_gcp_machine_type
  from .cloud.resource_utils import adjust_cores_for_memory_request, adjust_cores_for_packability, cores_mcpu_to_memory_bytes, local_ssd_size, machine_type_to_worker_type_cores, requested_storage_bytes_to_actual_storage_gib, valid_machine_types
  from .cloud.utils import possible_cloud_locations
  from .driver.billing_manager import ProductVersionInfo, ProductVersions
  from .instance_config import InstanceConfig
label_desc: Use image node_id 5 for calling the InstanceCollectionConfigs obj's underlying member method code with example usage: obj.select_inst_coll(cloud, machine_type, preemptible, worker_type, req_cores_mcpu, req_memory_bytes, req_storage_bytes) and returns: result,  None