code: def test_forward(self, sample, keys, expected):
      transform = Mock(return_value=["out"] * len(keys))
      ApplyToKeys(keys, transform)(sample)
      if expected is not None:
          transform.assert_called_once_with(expected)
      else:
          transform.assert_not_called()
  
file_path: lightning-flash/tests/core/data/test_transforms.py
imports: from unittest.mock import Mock
  import pytest
  import torch
  from flash.core.data.io.input import DataKeys
  from flash.core.data.transforms import ApplyToKeys
  from flash.core.utilities.imports import _TOPIC_CORE_AVAILABLE
label_desc: Use image node_id 1 for calling the TestApplyToKeys obj's underlying member method code with example usage: obj.test_forward(sample, keys, expected) without return types