class_docstr: Registry of pluggable filesystem implementations used in TFX components.
docstr: Register a filesystem implementation.
  
  Args:
    filesystem_cls: Subclass of `tfx.dsl.io.filesystem.Filesystem`.
    priority: Integer priority index (lower is more preferred) specifying
      plugin search order for filesystem schemes supported by the filesystem
      class.
    use_as_fallback: If `True`, use the given filesystem class to provide
      fallback access to filesystem not explicitly supported by a registered
      filesystem plugin.
code: def register(
      self,
      filesystem_cls: Type[filesystem.Filesystem],
      priority: int,
      use_as_fallback: bool = False,
  ) -> None:
      """Register a filesystem implementation.
  
      Args:
        filesystem_cls: Subclass of `tfx.dsl.io.filesystem.Filesystem`.
        priority: Integer priority index (lower is more preferred) specifying
          plugin search order for filesystem schemes supported by the filesystem
          class.
        use_as_fallback: If `True`, use the given filesystem class to provide
          fallback access to filesystem not explicitly supported by a registered
          filesystem plugin.
      """
      with self._registration_lock:
          self._filesystem_priority[filesystem_cls] = priority
          for scheme in filesystem_cls.SUPPORTED_SCHEMES:
              current_preferred = (
                  self._preferred_filesystem_by_scheme.get(scheme)
              )
              if (
                  not current_preferred
                  or priority
                  < self._filesystem_priority[current_preferred]
              ):
                  self._preferred_filesystem_by_scheme[
                      scheme
                  ] = filesystem_cls
          if use_as_fallback:
              if (
                  not self._fallback_filesystem
                  or priority
                  < self._filesystem_priority[self._fallback_filesystem]
              ):
                  self._fallback_filesystem = filesystem_cls
  
file_path: tfx/tfx/dsl/io/filesystem_registry.py
imports: import re
  import threading
  from typing import Type
  from tfx.dsl.io import filesystem
  from tfx.dsl.io.filesystem import PathType
label_desc: Use image node_id 2 for calling the FilesystemRegistry obj's underlying member method code with example usage: obj.register(filesystem_cls, priority, use_as_fallback) without return types