code: def _make_resource(
      resource_dir: str, resource_name: str
  ) -> Tuple[str, str]:
      path = os.path.dirname(os.path.abspath(__file__))
      template_dir = os.path.join(path, resource_dir)
      name_for_files = re.sub("-", "_", resource_name)
  
      new_resource_name = os.path.join(os.getcwd(), resource_name)
  
      # lay out scaffolding
      logger.info(
          f"laying out component template at {new_resource_name}"
      )
      shutil.copytree(template_dir, new_resource_name)
  
      # rename main folder
      os.rename(
          os.path.join(new_resource_name, "placeholdername"),
          os.path.join(new_resource_name, name_for_files),
      )
  
      # for each file, rename the word
      trouble_names = {".DS_Store"}
      files = _ls_recursively(new_resource_name)
      for bad_file in files:
          if bad_file.split("/")[-1] in trouble_names:
              continue
          # find the words and replace
          with open(bad_file) as fo:
              content = fo.read().replace(
                  "placeholdername", name_for_files
              )
          with open(bad_file, "w") as fw:
              fw.write(content)
  
      # rename files
      for file_name in files:
          new_file = re.sub(
              "placeholdername", name_for_files, file_name
          )
          os.rename(file_name, new_file)
  
      return new_resource_name, name_for_files
  
file_path: pytorch-lightning/src/lightning/app/cli/cmd_init.py
imports: import os
  import re
  import shutil
  from typing import List, Optional, Tuple
  from lightning.app.utilities.app_helpers import Logger
label_desc: Use image node_id 2 for calling a global function with example usage: _make_resource(resource_dir, resource_name) and returns: new_resource_name,  name_for_files