class_docstr: Class implementing OneHotEncoder operators for strings in PyTorch.
  
  Because we are dealing with tensors, strings require additional length information for processing.
code: def forward(self, x):
      encoded_tensors = []
      for i in range(self.num_columns):
          # First we fetch the condition for the particular column.
          conditions = self.condition_tensors[
              self.categories_idx[i] : self.categories_idx[i + 1], :
          ].view(1, -1, self.max_word_length // 4)
          # Differently than the numeric case where eq is enough, here we need to aggregate per object (dim = 2)
          # because objects can span multiple integers. We use product here since all ints must match to get encoding of 1.
          encoded_tensors.append(
              torch.prod(
                  torch.eq(x[:, i : i + 1, :], conditions), dim=2
              )
          )
  
      return torch.cat(encoded_tensors, dim=1).float()
  
file_path: hummingbird/hummingbird/ml/operator_converters/_one_hot_encoder_implementations.py
imports: import numpy
  import torch
  from ._physical_operator import PhysicalOperator
  from .None import constants
label_desc: Use image node_id 2 for calling the OneHotEncoderString obj's underlying member method code with example usage: obj.forward(x) and returns: torch