code: def get_neptune_path(ctx: Any, param: Any, path: str) -> Path:
      # check if path exists and contains a '.neptune' folder
      local_path = Path(path)
  
      if (local_path / NEPTUNE_DATA_DIRECTORY).is_dir():
          return local_path / NEPTUNE_DATA_DIRECTORY
      elif (
          local_path.name == NEPTUNE_DATA_DIRECTORY
          and local_path.is_dir()
      ):
          return local_path
      else:
          raise click.BadParameter(
              "Path {} does not contain a '{}' folder.".format(
                  local_path, NEPTUNE_DATA_DIRECTORY
              )
          )
  
file_path: neptune-client/src/neptune/cli/path_option.py
imports: from pathlib import Path
  from typing import Any
  import click
  from neptune.common.exceptions import NeptuneException
  from neptune.constants import NEPTUNE_DATA_DIRECTORY
  from neptune.exceptions import CannotSynchronizeOfflineRunsWithoutProject, ProjectNotFound, RunNotFound
  from neptune.internal.backends.api_model import ApiExperiment, Project
  from neptune.internal.backends.neptune_backend import NeptuneBackend
  from neptune.internal.disk_queue import DiskQueue
  from neptune.internal.operation import Operation
label_desc: Use image node_id 1 for calling a global function with example usage: get_neptune_path(ctx, param, path) and returns: unknown, local_path