docstr: Find the Worker Dockerfile and it's context path
  - PROD will be in `$APPDIR/grid/`
  - DEV will be in `packages/grid/backend`
  - In both the cases context dir does not matter (unless we're calling COPY)
  
  Args:
      type (str): The type of worker.
  Returns:
      Path: The path to the Dockerfile.
docstr_tok: ["Find","the","Worker","Dockerfile","and","it","'s","context","path","-","PROD","will","be","in","`","$","APPDIR\/grid\/","`","-","DEV","will","be","in","`","packages\/grid\/backend","`","-","In","both","the","cases","context","dir","does","not","matter","(","unless","we","'re","calling","COPY",")","Args",":","type","(","str",")",":","The","type","of","worker",".","Returns",":","Path",":","The","path","to","the","Dockerfile","."]
code: def _find_template_dir(self, type: str) -> Tuple[Path, str]:
      """
      Find the Worker Dockerfile and it's context path
      - PROD will be in `$APPDIR/grid/`
      - DEV will be in `packages/grid/backend`
      - In both the cases context dir does not matter (unless we're calling COPY)
  
      Args:
          type (str): The type of worker.
      Returns:
          Path: The path to the Dockerfile.
      """
      filename = f"worker_{type}.dockerfile"
      lookup_paths = [
          Path(self.TEMPLATE_DIR_PROD, filename).resolve(),
          Path(__file__, self.TEMPLATE_DIR_DEV, filename).resolve(),
      ]
      for path in lookup_paths:
          if path.exists():
              return path.parent, filename
  
      raise FileNotFoundError(f"Cannot find the {filename}")
  
imports: import contextlib
  import io
  import os.path
  from pathlib import Path
  from typing import Any
  from typing import Iterable
  from typing import Optional
  from typing import Tuple
  import docker
  from docker.models.images import Image
  from .config import CustomWorkerConfig
  from .config import DockerWorkerConfig
  from .config import WorkerConfig
label_desc: Use image node_id 7 for calling the CustomWorkerBuilder obj's underlying member method code with example usage: obj._find_template_dir(type) and returns: path,  filename