class_docstr: AWS Inferentia and Trainium accelerators.
class_docstr_tok: ["AWS","Inferentia","and","Trainium","accelerators","."]
code: def get_ec2_instance_num_accelerators(
      instance_type: str, instances: dict
  ) -> Optional[int]:
      # TODO: AWS SDK (public API) doesn't yet expose the NeuronCore
      # information. It will be available (work-in-progress)
      # as xxAcceleratorInfo in InstanceTypeInfo.
      # https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceTypeInfo.html
      # See https://github.com/ray-project/ray/issues/38473
      return AWS_NEURON_INSTANCE_MAP.get(instance_type.lower(), None)
  
file_path: ray/python/ray/_private/accelerators/neuron.py
imports: import os
  import sys
  import json
  import logging
  import subprocess
  from typing import Optional, List, Tuple
  from ray._private.accelerators.accelerator import AcceleratorManager
label_desc: Use image node_id 8 for calling the NeuronAcceleratorManager obj's underlying member method code with example usage: obj.get_ec2_instance_num_accelerators(instance_type, instances) and returns: AWS_NEURON_INSTANCE_MAP