code: def _in_test_dir():
      """Check if the current working directory ends with gradio/js/preview/test."""
      return Path.cwd().parts[-4:] == (
          "gradio",
          "js",
          "preview",
          "test",
      )
  
imports: from __future__ import annotations
  import dataclasses
  import inspect
  import json
  import re
  import shutil
  import textwrap
  from pathlib import Path
  from typing import Literal
  import gradio
label_desc: Use image node_id 1 for calling a global function with example usage: _in_test_dir() and returns: unknown