code: def convert_module(module, dtype):
      """
      Converts a module's immediate parameters and buffers to dtype.
      """
      for param in module.parameters(recurse=False):
          if param is not None:
              if param.data.dtype.is_floating_point:
                  param.data = param.data.to(dtype=dtype)
              if (
                  param._grad is not None
                  and param._grad.data.dtype.is_floating_point
              ):
                  param._grad.data = param._grad.data.to(dtype=dtype)
  
      for buf in module.buffers(recurse=False):
          if buf is not None and buf.data.dtype.is_floating_point:
              buf.data = buf.data.to(dtype=dtype)
  
imports: import torch
  import torch.nn
  from torch.autograd import Variable
  from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
label_desc: Use image node_id 3 for calling a global function with example usage: convert_module(module, dtype) without return types