code: def _test_load_from_checkpoint_dependency_error(self):
      """Tests that a ``ModuleNotFoundError`` is raised when ``load_from_checkpoint`` is called if the required
      dependencies are not available."""
      with pytest.raises(
          ModuleNotFoundError,
          match="Required dependencies not available.",
      ):
          self.task.load_from_checkpoint("not_a_real_checkpoint.pt")
  
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 9 for calling a global function with example usage: _test_load_from_checkpoint_dependency_error() without return types