code: def linear_to_crypten(pytorch_linear):
      """
      Converts torch.nn.Linear module into crypten.nn.Linear module.
      """
      assert isinstance(pytorch_linear, torch.nn.Linear)
      out_channels, in_channels = pytorch_linear.weight.size()
      crypten_linear = crypten.nn.Linear(in_channels, out_channels)
      crypten_linear.set_parameter("weight", pytorch_linear.weight)
      crypten_linear.set_parameter("bias", pytorch_linear.bias)
      return crypten_linear
  
imports: import copy
  import itertools
  import logging
  import unittest
  import crypten
  import crypten.communicator
  import torch
  import torch.nn.functional
  from crypten.common.rng import generate_random_ring_element
  from crypten.common.tensor_types import is_float_tensor
  from crypten.config import cfg
  from crypten.encoder import FixedPointEncoder
  from test.multiprocess_test_case import get_random_linear, get_random_test_tensor, MultiProcessTestCase, onehot
label_desc: Use image node_id 1 for calling a global function with example usage: linear_to_crypten(pytorch_linear) and returns: crypten_linear