class_docstr: Abstract base class to define a common interface for FolderLayout and derived classes
  Mainly, defines the ``filename(**kwargs) -> PathLike`` function, which must be defined
  by the deriving class.
  
  Example:
  
  .. code-block:: python
  
      from monai.data import FolderLayoutBase
  
      class MyFolderLayout(FolderLayoutBase):
          def __init__(
              self,
              basepath: Path,
              extension: str = "",
              makedirs: bool = False
          ):
              self.basepath = basepath
              if not extension:
                  self.extension = ""
              elif extension.startswith("."):
                  self.extension = extension:
              else:
                  self.extension = f".{extension}"
              self.makedirs = makedirs
  
          def filename(self, patient_no: int, image_name: str, **kwargs) -> Path:
              sub_path = self.basepath / patient_no
              if not sub_path.exists():
                  sub_path.mkdir(parents=True)
  
              file = image_name
              for k, v in kwargs.items():
                  file += f"_{k}-{v}"
  
              file +=  self.extension
              return sub_path / file
class_docstr_tok: ["Abstract","base","class","to","define","a","common","interface","for","FolderLayout","and","derived","classes","Mainly",",","defines","the","``","filename","(","*","*","kwargs",")","-",">","PathLike","``","function",",","which","must","be","defined","by","the","deriving","class",".","Example",":","..","code-block",":",":","python","from","monai.data","import","FolderLayoutBase","class","MyFolderLayout","(","FolderLayoutBase",")",":","def","__init__","(","self",",","basepath",":","Path",",","extension",":","str","=","``","''",",","makedirs",":","bool","=","False",")",":","self.basepath","=","basepath","if","not","extension",":","self.extension","=","``","''","elif","extension.startswith","(","``",".","``",")",":","self.extension","=","extension",":","else",":","self.extension","=","f","''",".","{","extension","}","''","self.makedirs","=","makedirs","def","filename","(","self",",","patient_no",":","int",",","image_name",":","str",",","*","*","kwargs",")","-",">","Path",":","sub_path","=","self.basepath","\/","patient_no","if","not","sub_path.exists","(",")",":","sub_path.mkdir","(","parents=True",")","file","=","image_name","for","k",",","v","in","kwargs.items","(",")",":","file","+=","f","''","_","{","k","}","-","{","v","}","''","file","+=","self.extension","return","sub_path","\/","file"]
docstr: Create a filename with path based on the input kwargs.
  Abstract method, implement your own.
docstr_tok: ["Create","a","filename","with","path","based","on","the","input","kwargs",".","Abstract","method",",","implement","your","own","."]
code: def filename(self, **kwargs) -> PathLike:
      """
      Create a filename with path based on the input kwargs.
      Abstract method, implement your own.
      """
      raise NotImplementedError
  
file_path: MONAI/monai/data/folder_layout.py
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  import monai
  from monai.config import PathLike
  from monai.data.utils import create_file_basename
label_desc: Use image node_id 1 for calling the FolderLayoutBase obj's underlying member method code with example usage: obj.filename() without return types