code: def __len__(self):
      num_available_samples: int = (
          self.total_samples - self.consumed_samples
      )
      if self.global_batch_size is not None:
          if self.drop_last:
              return num_available_samples // self.global_batch_size
          else:
              return (
                  num_available_samples + self.global_batch_size - 1
              ) // self.global_batch_size
      else:
          return (
              num_available_samples - 1
          ) // self.micro_batch_times_data_parallel_size + 1
  
file_path: NeMo/nemo/collections/nlp/data/language_modeling/megatron/data_samplers.py
imports: import abc
  from itertools import chain
  from typing import Optional
  import torch
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling the BaseMegatronSampler obj's underlying member method code with example usage: obj.__len__() and returns: unknown, unknown, unknown