class_docstr: The ``TaskTesterMeta`` is a metaclass which attaches a suite of tests to classes that extend ``TaskTester`` based
  on the configuration variables they define.
  
  These tests will also be wrapped with the appropriate marks to skip them if the required dependencies are not
  available.
class_docstr_tok: ["The","``","TaskTesterMeta","``","is","a","metaclass","which","attaches","a","suite","of","tests","to","classes","that","extend","``","TaskTester","``","based","on","the","configuration","variables","they","define",".","These","tests","will","also","be","wrapped","with","the","appropriate","marks","to","skip","them","if","the","required","dependencies","are","not","available","."]
code: def attach_test(task_tester, test_name, test):
      test = _copy_func(test)
  
      # Resolve marks
      marks = task_tester.marks.get(test_name, None)
      if marks is not None:
          if not isinstance(marks, List):
              marks = [marks]
  
          for mark in marks:
              test = mark(test)
  
      # Attach test
      setattr(task_tester, test_name, test)
  
imports: import contextlib
  import functools
  import inspect
  import os
  import types
  from abc import ABCMeta
  from typing import Any, Dict, List, Optional, Tuple
  from unittest.mock import patch
  import flash
  import pytest
  import torch
  from flash.__main__ import main
  from flash.core.model import Task
  from torch.utils.data import Dataset
label_desc: Use image node_id 1 for calling the TaskTesterMeta obj's underlying member method code with example usage: obj.attach_test(task_tester, test_name, test) without return types