docstr: monai subclasses of MapTransforms must have alias names ending with 'd', 'D', 'Dict'
docstr_tok: ["monai","subclasses","of","MapTransforms","must","have","alias","names","ending","with","'d","'",",","'D","'",",","'Dict","'"]
code: def test_transform_api(self):
      """monai subclasses of MapTransforms must have alias names ending with 'd', 'D', 'Dict'"""
      to_exclude = {"MapTransform"}  # except for these transforms
      to_exclude_docs = {
          "Decollate",
          "Ensemble",
          "Invert",
          "SaveClassification",
          "RandTorchVision",
          "RandCrop",
      }
      to_exclude_docs.update(
          {
              "DeleteItems",
              "SelectItems",
              "FlattenSubKeys",
              "CopyItems",
              "ConcatItems",
          }
      )
      to_exclude_docs.update({"ToMetaTensor", "FromMetaTensor"})
      xforms = {
          name: obj
          for name, obj in monai.transforms.__dict__.items()
          if inspect.isclass(obj)
          and issubclass(obj, monai.transforms.MapTransform)
      }
      names = sorted(x for x in xforms if x not in to_exclude)
      remained = set(names)
      doc_file = os.path.join(
          pathlib.Path(__file__).parent.parent,
          "docs",
          "source",
          "transforms.rst",
      )
      contents = (
          pathlib.Path(doc_file).read_text()
          if os.path.exists(doc_file)
          else None
      )
      for n in names:
          if not n.endswith("d"):
              continue
          with self.subTest(n=n):
              basename = n[:-1]  # Transformd basename is Transform
              for docname in (f"{basename}", f"{basename}d"):
                  if docname in to_exclude_docs:
                      continue
                  if (
                      contents is not None
                  ) and f"`{docname}`" not in f"{contents}":
                      self.assertTrue(
                          False,
                          f"please add `{docname}` to docs/source/transforms.rst",
                      )
              for postfix in ("D", "d", "Dict"):
                  remained.remove(f"{basename}{postfix}")
      self.assertFalse(remained)
  
file_path: MONAI/tests/test_module_list.py
imports: from __future__ import annotations
  import glob
  import inspect
  import os
  import pathlib
  import unittest
  import monai
label_desc: Use image node_id 2 for calling the TestAllImport obj's underlying member method code with example usage: obj.test_transform_api() without return types