code: def _get_nb_instance():
      """Placeholder docstring"""
      gpu_info = _get_available_gpus(False)
      if not gpu_info:
          return None
  
      gpu_name, gpu_mem = gpu_info[0].split(", ")
      cpu_count = multiprocessing.cpu_count()
  
      hardware = hardware_lookup.get(gpu_name)
      if not hardware:
          logger.info(
              "Could not detect the instance type for GPU: %s, %s",
              gpu_name,
              gpu_mem,
          )
          return None
  
      if gpu_name == "NVIDIA A100":
          gpu_mem_mib = int(gpu_mem.split(" ")[0])
          gpu_mem_gb = gpu_mem_mib * 1024**2 / 1000**3
  
          if ceil(gpu_mem_gb) in hardware:
              instance_type = hardware.get(int(ceil(gpu_mem_gb)))
          else:
              instance_type = hardware.get(int(floor(gpu_mem_gb)))
      else:
          instance_type = hardware.get(cpu_count)
  
      logger.info(
          "Local instance_type %s detected. "
          "%s will be default when deploying to a SageMaker Endpoint. "
          "This default can be overriden in model.deploy()",
          instance_type,
          instance_type,
      )
      return instance_type
  
file_path: sagemaker-python-sdk/src/sagemaker/serve/utils/local_hardware.py
imports: from __future__ import absolute_import
  import subprocess
  import multiprocessing
  import logging
  import shutil
  from math import ceil, floor
  from platform import system
  from pathlib import Path
  import psutil
  from sagemaker import Session
label_desc: Use image node_id 2 for calling a global function with example usage: _get_nb_instance() and returns: instance_type, None, None