code: def is_pipeline_last_stage(ignore_virtual=False):
      """Return True if in the last pipeline model-parallel stage, False otherwise."""
      if not ignore_virtual:
          virtual_pipeline_model_parallel_world_size = (
              get_virtual_pipeline_model_parallel_world_size()
          )
          if (
              virtual_pipeline_model_parallel_world_size is not None
              and get_virtual_pipeline_model_parallel_rank()
              != (virtual_pipeline_model_parallel_world_size - 1)
          ):
              return False
      return get_pipeline_model_parallel_rank() == (
          get_pipeline_model_parallel_world_size() - 1
      )
  
imports: from typing import Tuple, Optional
  import warnings
  import os
  import torch
  from apex.transformer.log_util import get_transformer_logger
  from apex.transformer._ucc_util import HAS_UCC
label_desc: Use image node_id 38 for calling a global function with example usage: is_pipeline_last_stage(ignore_virtual) and returns: unknown, False