code: def copy_files(extension, source, target=None):
      """Copy matching files from source to target.
  
      Scan the ``source`` folder and copy any file that end with
      the given ``extension`` to the ``target`` folder.
  
      Both ``source`` and ``target`` are expected to be either a ``str`` or a
      list or tuple of strings to be joined using ``os.path.join``.
  
      ``sourec`` will be interpreted as a path relative to the ``atm`` root
      code folder, and ``target`` will be interpreted as a path relative to
      the user's current working directory.
  
      If ``target`` is ``None``, ``source`` will be used, and if the ``target``
      directory does not exist, it will be created.
  
      Args:
          extension (str):
              File extension to copy.
          source (str or iterabe):
              Source directory.
          target (str or iterabe or None):
              Target directory. Defaults to ``None``.
  
      Returns:
          dict:
              Dictionary containing the file names without extension as keys
              and the new paths as values.
      """
      if isinstance(source, (list, tuple)):
          source = os.path.join(*source)
  
      if isinstance(target, (list, tuple)):
          target = os.path.join(*target)
      elif target is None:
          target = source
  
      source_dir = os.path.join(os.path.dirname(__file__), source)
      target_dir = os.path.join(os.getcwd(), target)
  
      if not os.path.exists(target_dir):
          os.makedirs(target_dir)
  
      file_paths = dict()
  
      for source_file in glob.glob(
          os.path.join(source_dir, "*." + extension)
      ):
          file_name = os.path.basename(source_file)
          target_file = os.path.join(target_dir, file_name)
          print("Generating file {}".format(target_file))
          shutil.copy(source_file, target_file)
          file_paths[file_name[: -(len(extension) + 1)]] = target_file
  
      return file_paths
  
file_path: ATM/atm/data.py
imports: import glob
  import logging
  import os
  import shutil
  import boto3
  import pandas
  import requests
  from botocore import UNSIGNED
  from botocore.client import Config
  from botocore.exceptions import ClientError
label_desc: Use image node_id 1 for calling a global function with example usage: copy_files(extension, source, target) and returns: file_paths