class_docstr: If you wish to write a custom profiler, you should inherit from this class.
code: def local_rank(self) -> int:
      return 0 if self._local_rank is None else self._local_rank
  
imports: import logging
  import os
  from abc import ABC, abstractmethod
  from contextlib import contextmanager
  from pathlib import Path
  from typing import Any, Callable, Dict, Generator, Optional, TextIO, Union
  from lightning.fabric.utilities.cloud_io import get_filesystem
label_desc: Use image node_id 14 for calling the Profiler obj's underlying member method code with example usage: obj.local_rank() and returns: unknown