code: def get_by_name(
      self, name: str, download_if_needed: bool = True
  ) -> pathlib.Path:
      checkpoint = self.storage[name]
      disk_name = self.disk_root / checkpoint.fname
  
      if not disk_name.exists():
          if download_if_needed:
              self.download_by_name(name)
          else:
              raise FileNotFoundError(
                  f"Checkpoint {checkpoint} was not found locally at {disk_name}, please set `allow_download` flag"
              )
      return disk_name
  
file_path: textlesslib/textless/checkpoint_manager/manager.py
imports: from typing import Union
  from dataclasses import dataclass
  from torch.hub import download_url_to_file
  import pathlib
label_desc: Use image node_id 4 for calling the CheckpointManager obj's underlying member method code with example usage: obj.get_by_name(name, download_if_needed) and returns: disk_name