class_docstr: Represents the source code directory and provide the utilities to manage it.
class_docstr_tok: ["Represents","the","source","code","directory","and","provide","the","utilities","to","manage","it","."]
docstr: Calculates the checksum of a local path.
docstr_tok: ["Calculates","the","checksum","of","a","local","path","."]
code: def version(self):
      """Calculates the checksum of a local path."""
      # cache value to prevent doing this over again
      if self._version is not None:
          return self._version
  
      # create a random version ID and store it
      self._version = uuid.uuid4().hex
      return self._version
  
file_path: pytorch-lightning/src/lightning/app/source_code/local.py
imports: import os
  import uuid
  from contextlib import contextmanager
  from pathlib import Path
  from shutil import copytree, rmtree
  from typing import List, Optional
  from lightning.app.core.constants import DOT_IGNORE_FILENAME, SYS_CUSTOMIZATIONS_SYNC_PATH
  from lightning.app.source_code.copytree import _IGNORE_FUNCTION, _copytree
  from lightning.app.source_code.tar import _tar_path
  from lightning.app.source_code.uploader import FileUploader
label_desc: Use image node_id 3 for calling the LocalSourceCodeDir obj's underlying member method code with example usage: obj.version() and returns: self, self