code: def convert_to_target_pre_hook(module, *args):
      r"""Pre-hook for automatically calling `.to(X)` on module prior to `forward`"""
      module.to(args[0][0])
  
file_path: botorch/botorch/utils/transforms.py
imports: from __future__ import annotations
  import warnings
  from functools import wraps
  from typing import Any, Callable, List, Optional, TYPE_CHECKING
  import torch
  from botorch.utils.safe_math import logmeanexp
  from torch import Tensor
label_desc: Use image node_id 11 for calling a global function with example usage: convert_to_target_pre_hook(module) without return types