code: def get_ec2_tvm_flags() -> Dict[str, Dict]:
      r"""Return the recommended flags for TVM compilation in AWS EC2 instances.
  
      Including C4, C5, G4, P3.
  
      For more details about AWS EC2 instances, refer to https://aws.amazon.com/ec2/instance-types/.
  
      Returns
      -------
      info_dict
          A dictionary that contains the mapping between instance type and the
          corresponding compilation flags.
          Each element includes:
  
          - target
              The compilation target
          - use_gpu
              Whether it's a GPU instance
          - opt_level
              The optimization level in compilation
          - pass
              Additional graph passes for further improvement.
      """
      instance_info = {
          "g4": {
              "target": "cuda -model=t4 -libs=cublas,cudnn",
              "use_gpu": True,
              "opt_level": 3,
              "required_pass": ["FastMath"],
          },
          "c4": {
              "target": "llvm -mcpu=core-avx2 -libs=cblas",
              "use_gpu": False,
              "opt_level": 3,
              "required_pass": ["FastMath"],
          },
          "c5": {
              "target": "llvm -mcpu=skylake-avx512 -libs=cblas",
              "use_gpu": False,
              "opt_level": 3,
              "required_pass": ["FastMath"],
          },
          "p3": {
              "target": "cuda -model=v100 -libs=cublas,cudnn",
              "use_gpu": True,
              "opt_level": 3,
              "required_pass": ["FastMath"],
          },
      }
      return instance_info
  
imports: import tvm.relay.op
  import tvm.relay.expr
  from typing import Dict
  from tvm.relay.frontend.mxnet import _convert_map
  from tvm.relay.frontend.common import infer_type
label_desc: Use image node_id 1 for calling a global function with example usage: get_ec2_tvm_flags() and returns: instance_info