class_docstr: If you wish to write a custom profiler, you should inherit from this class.
code: def _prepare_filename(
      self,
      action_name: Optional[str] = None,
      extension: str = ".txt",
      split_token: str = "-",
  ) -> str:
      args = []
      if self._stage is not None:
          args.append(self._stage)
      if self.filename:
          args.append(self.filename)
      if self._local_rank is not None:
          args.append(str(self._local_rank))
      if action_name is not None:
          args.append(action_name)
      return split_token.join(args) + extension
  
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 7 for calling the Profiler obj's underlying member method code with example usage: obj._prepare_filename(action_name, extension, split_token) and returns: unknown