code: def parseEC2Json2List(jsontext, region):
      
      currentList = json.loads(jsontext)
      ec2InstanceList = []
      for k, v in iteritems(currentList["products"]):
          if "location" in v["attributes"] and v["attributes"]["location"] == region:
              # 3 tenant types: 'Host' (always $0.00; just a template?)
              #                 'Dedicated' (toil does not support; these are pricier)
              #                 'Shared' (AWS default and what toil uses)
              if "tenancy" in v["attributes"] and v["attributes"]["tenancy"] == "Shared":
                  if v["attributes"]["operatingSystem"] == "Linux":
                      # The same instance can appear with multiple "operation"
                      # values; "RunInstances" is normal, and
                      # "RunInstances:<code>" is e.g. Linux with MS SQL Server
                      # installed.
                      if v["attributes"]["operation"] == "RunInstances":
                          disks, disk_capacity = parseStorage(v["attributes"]["storage"])
                          memory = parseMemory(v["attributes"]["memory"])
                          instance = InstanceType(name=v["attributes"]["instanceType"],
                                                  cores=v["attributes"]["vcpu"],
                                                  memory=memory,
                                                  disks=disks,
                                                  disk_capacity=disk_capacity)
                          if instance not in ec2InstanceList:
                              ec2InstanceList.append(instance)
                          else:
                              raise RuntimeError('EC2 JSON format has likely changed.  '
                                                 'Duplicate instance {} found.'.format(instance))
      return ec2InstanceList
docs: Takes a JSON and returns a list of InstanceType objects representing EC2 instance params.
  
      :param jsontext:
      :param region:
      :return: