code: def retrieve_available_artifacts():
      class Artifact:
          def __init__(
              self,
              name: str,
              single_gpu: bool = False,
              multi_gpu: bool = False,
          ):
              self.name = name
              self.single_gpu = single_gpu
              self.multi_gpu = multi_gpu
              self.paths = []
  
          def __str__(self):
              return self.name
  
          def add_path(self, path: str, gpu: str = None):
              self.paths.append(
                  {"name": self.name, "path": path, "gpu": gpu}
              )
  
      _available_artifacts: Dict[str, Artifact] = {}
  
      directories = filter(os.path.isdir, os.listdir())
      for directory in directories:
          if directory.startswith("single-gpu"):
              artifact_name = directory[len("single-gpu") + 1 :]
  
              if artifact_name in _available_artifacts:
                  _available_artifacts[artifact_name].single_gpu = True
              else:
                  _available_artifacts[artifact_name] = Artifact(
                      artifact_name, single_gpu=True
                  )
  
              _available_artifacts[artifact_name].add_path(
                  directory, gpu="single"
              )
  
          elif directory.startswith("multi-gpu"):
              artifact_name = directory[len("multi-gpu") + 1 :]
  
              if artifact_name in _available_artifacts:
                  _available_artifacts[artifact_name].multi_gpu = True
              else:
                  _available_artifacts[artifact_name] = Artifact(
                      artifact_name, multi_gpu=True
                  )
  
              _available_artifacts[artifact_name].add_path(
                  directory, gpu="multi"
              )
          else:
              artifact_name = directory
              if artifact_name not in _available_artifacts:
                  _available_artifacts[artifact_name] = Artifact(
                      artifact_name
                  )
  
              _available_artifacts[artifact_name].add_path(directory)
  
      return _available_artifacts
  
imports: import ast
  import collections
  import functools
  import json
  import math
  import operator
  import os
  import re
  import sys
  import time
  from typing import Dict, List, Optional, Union
  import requests
  from slack_sdk import WebClient
label_desc: Use image node_id 6 for calling a global function with example usage: retrieve_available_artifacts() and returns: _available_artifacts, self