code: def test_lazy_artifact_passthrough(user):
      with wandb.init() as run:
          art = wandb.Artifact(
              "test_lazy_artifact_passthrough", "dataset"
          )
  
          t1 = wandb.Table(columns=[], data=[])
          e = art.add(t1, "t1")
          with pytest.raises(ValueError):
              e.ref_target()
  
          # These getters should be valid both before and after logging
          testable_getters_valid = [
              "id",
              "name",
              "source_name",
              "type",
              "description",
              "metadata",
              "distributed_id",
              "incremental",
              "use_as",
              "state",
              "manifest",
              "digest",
              "size",
          ]
          # These getters should be valid only after logging
          testable_getters_invalid = [
              "entity",
              "project",
              "qualified_name",
              "version",
              "source_entity",
              "source_project",
              "source_qualified_name",
              "source_version",
              "aliases",
              "commit_hash",
              "file_count",
              "created_at",
              "updated_at",
          ]
  
          # These setters should be valid both before and after logging
          testable_setters_valid = [
              "description",
              "metadata",
              "distributed_id",
          ]
          # These setters should be valid only after logging
          testable_setters_invalid = ["aliases"]
          setter_data = {"metadata": {}, "aliases": []}
  
          # These methods should be valid both before and after logging
          testable_methods_valid = ["finalize", "is_draft"]
          # These methods should be valid only after logging
          testable_methods_invalid = [
              "get_entry",
              "get",
              "download",
              "checkout",
              "verify",
              "delete",
              "used_by",
              "logged_by",
              "json_encode",
          ]
          params = {
              "get_entry": ["t1.table.json"],
              "get": ["t1"],
              "delete": [True],
          }
  
          for valid_getter in testable_getters_valid:
              _ = getattr(art, valid_getter)
          for invalid_getter in testable_getters_invalid:
              with pytest.raises(ArtifactNotLoggedError):
                  _ = getattr(art, invalid_getter)
  
          for valid_setter in testable_setters_valid:
              setattr(
                  art,
                  valid_setter,
                  setter_data.get(valid_setter, valid_setter),
              )
          for invalid_setter in testable_setters_invalid:
              with pytest.raises(ArtifactNotLoggedError):
                  setattr(
                      art,
                      invalid_setter,
                      setter_data.get(invalid_setter, invalid_setter),
                  )
  
          for valid_method in testable_methods_valid:
              attr_method = getattr(art, valid_method)
              _ = attr_method(*params.get(valid_method, []))
          for invalid_method in testable_methods_invalid:
              attr_method = getattr(art, invalid_method)
              with pytest.raises(ArtifactNotLoggedError):
                  _ = attr_method(*params.get(invalid_method, []))
  
          # THE LOG
          run.log_artifact(art)
  
          for valid_getter in testable_getters_valid:
              _ = getattr(art, valid_getter)
          for invalid_getter in testable_getters_invalid:
              with pytest.raises(ArtifactNotLoggedError):
                  _ = getattr(art, invalid_getter)
  
          for valid_setter in testable_setters_valid:
              setattr(
                  art,
                  valid_setter,
                  setter_data.get(valid_setter, valid_setter),
              )
          for invalid_setter in testable_setters_invalid:
              with pytest.raises(ArtifactNotLoggedError):
                  setattr(
                      art,
                      invalid_setter,
                      setter_data.get(invalid_setter, invalid_setter),
                  )
  
          for valid_method in testable_methods_valid:
              attr_method = getattr(art, valid_method)
              _ = attr_method(*params.get(valid_method, []))
          for invalid_method in testable_methods_invalid:
              attr_method = getattr(art, invalid_method)
              with pytest.raises(ArtifactNotLoggedError):
                  _ = attr_method(*params.get(invalid_method, []))
  
          # THE ALL IMPORTANT WAIT
          art.wait()
  
          for getter in (
              testable_getters_valid + testable_getters_invalid
          ):
              _ = getattr(art, getter)
  
          for setter in (
              testable_setters_valid + testable_setters_invalid
          ):
              setattr(art, setter, setter_data.get(setter, setter))
  
          for method in (
              testable_methods_valid + testable_methods_invalid
          ):
              attr_method = getattr(art, method)
              _ = attr_method(*params.get(method, []))
  
file_path: wandb/tests/pytest_tests/system_tests/test_artifacts/test_misc2.py
imports: from typing import Callable
  import numpy
  import pytest
  import wandb
  from wandb.sdk.artifacts.exceptions import ArtifactNotLoggedError
  from wandb.testing.relay import TokenizedCircularPattern
label_desc: Use image node_id 3 for calling a global function with example usage: test_lazy_artifact_passthrough(user) without return types