code: def test_overwrite_values(test_dataset, value, variable, target):
      dataset = deepcopy(test_dataset)
  
      # create variables to check against
      control_outputs = next(
          iter(dataset.to_dataloader(num_workers=0, train=False))
      )
      dataset.set_overwrite_values(
          value, variable=variable, target=target
      )
  
      # test change
      outputs = next(
          iter(dataset.to_dataloader(num_workers=0, train=False))
      )
      check_dataloader_output(dataset, outputs)
  
      if variable in dataset.reals:
          output_name_suffix = "cont"
      else:
          output_name_suffix = "cat"
  
      if target == "all":
          output_names = [
              f"encoder_{output_name_suffix}",
              f"decoder_{output_name_suffix}",
          ]
      else:
          output_names = [f"{target}_{output_name_suffix}"]
  
      for name in outputs[0].keys():
          changed = torch.isclose(
              outputs[0][name], control_outputs[0][name]
          ).all()
          if name in output_names or (
              "cat" in name and variable == "agency"
          ):  # exception for static categorical which should always change
              assert not changed, f"Output {name} should change"
          else:
              assert changed, f"Output {name} should not change"
  
      # test resetting
      dataset.reset_overwrite_values()
      outputs = next(
          iter(dataset.to_dataloader(num_workers=0, train=False))
      )
      for name in outputs[0].keys():
          changed = torch.isclose(
              outputs[0][name], control_outputs[0][name]
          ).all()
          assert changed, f"Output {name} should be reset"
      assert torch.isclose(
          outputs[1][0], control_outputs[1][0]
      ).all(), "Target should be reset"
  
imports: from copy import deepcopy
  import itertools
  import pickle
  from typing import Dict
  import networkx
  import numpy
  import pandas
  import pytest
  from sklearn.preprocessing import StandardScaler
  import torch
  from torch.utils.data.sampler import SequentialSampler
  from pytorch_forecasting.data import EncoderNormalizer, GroupNormalizer, NaNLabelEncoder, TimeSeriesDataSet
  from pytorch_forecasting.data.encoders import MultiNormalizer, TorchNormalizer
  from pytorch_forecasting.data.examples import get_stallion_data
  from pytorch_forecasting.data.timeseries import _find_end_indices
  from pytorch_forecasting.utils import to_list
label_desc: Use image node_id 11 for calling a global function with example usage: test_overwrite_values(test_dataset, value, variable, target) without return types