code: def __init__(self, *args, **kwargs):
      assert (
          self.tmp_dir is not None
      ), "TmpDirFileSystem.tmp_dir is not set"
      super().__init__(
          *args, **kwargs, local_root_dir=self.tmp_dir, auto_mkdir=True
      )
  
imports: import posixpath
  from pathlib import Path
  from unittest.mock import patch
  import pytest
  from fsspec.implementations.local import AbstractFileSystem, LocalFileSystem, stringify_path
  from fsspec.registry import _registry
label_desc: Use image node_id 1 to create a new TmpDirFileSystem object from inherited base classes: MockFileSystem with example: obj = TmpDirFileSystem()