class_docstr: Configuration class
      
class_docstr_tok: ["Configuration","class"]
code: def to_torch(self):
      states = []
      for key in self.key_order:
          state = (
              torch.tensor(self.params[key].partition).float()
              / self.params[key].product
              - 0.5
          )
          states.append(state)
  
      return torch.cat(states).float()
  
imports: import math
  import random
  import logging
  import copy
  import torch
  from torch import optim
  from torch import nn
  import torch.nn.functional
  import numpy
  import nni
  from nni.tuner import Tuner
label_desc: Use image node_id 7 for calling the Configuration obj's underlying member method code with example usage: obj.to_torch() and returns: torch