code: def cat_interactions(interactions):
      """Concatenate list of interactions to single interaction.
  
      Args:
          interactions (list of :class:`Interaction`): List of interactions to be concatenated.
  
      Returns:
          :class:`Interaction`: Concatenated interaction.
      """
      if not isinstance(interactions, (list, tuple)):
          raise TypeError(
              f"Interactions [{interactions}] should be list or tuple."
          )
      if len(interactions) == 0:
          raise ValueError(
              f"Interactions [{interactions}] should have some interactions."
          )
  
      columns_set = set(interactions[0].columns)
      for inter in interactions:
          if columns_set != set(inter.columns):
              raise ValueError(
                  f"Interactions [{interactions}] should have some interactions."
              )
  
      new_inter = {
          col: torch.cat([inter[col] for inter in interactions])
          for col in columns_set
      }
      return Interaction(new_inter)
  
imports: import numpy
  import pandas
  import torch
  import torch.nn.utils.rnn
label_desc: Use image node_id 2 for calling a global function with example usage: cat_interactions(interactions) and returns: Interaction