code: def find_min_instances_to_meet_vcpus(instance_types, target):
          
          # vcpus = [ (vcpus, instance_type), (vcpus, instance_type), ... ]
          instance_vcpus = []
          instances = []
  
          for instance_type in instance_types:
              if instance_type == 'optimal':
                  instance_type = 'm4.4xlarge'
  
              instance_vcpus.append(
                  (EC2_INSTANCE_TYPES[instance_type]['vcpus'], instance_type)
              )
  
          instance_vcpus = sorted(instance_vcpus, key=lambda item: item[0], reverse=True)
          # Loop through,
          #   if biggest instance type smaller than target, and len(instance_types)> 1, then use biggest type
          #   if biggest instance type bigger than target, and len(instance_types)> 1, then remove it and move on
  
          #   if biggest instance type bigger than target and len(instan_types) == 1 then add instance and finish
          #   if biggest instance type smaller than target and len(instan_types) == 1 then loop adding instances until target == 0
          #   ^^ boils down to keep adding last till target vcpus is negative
          #   #Algorithm ;-) ... Could probably be done better with some quality lambdas
          while target > 0:
              current_vcpu, current_instance = instance_vcpus[0]
  
              if len(instance_vcpus) > 1:
                  if current_vcpu <= target:
                      target -= current_vcpu
                      instances.append(current_instance)
                  else:
                      # try next biggest instance
                      instance_vcpus.pop(0)
              else:
                  # Were on the last instance
                  target -= current_vcpu
                  instances.append(current_instance)
  
          return instances
docs: Finds the minimum needed instances to meed a vcpu target
  
          :param instance_types: Instance types, like ['t2.medium', 't2.small']
          :type instance_types: list of str
          :param target: VCPU target
          :type target: float
          :return: List of instance types
          :rtype: list of str