code: def __init__(self, type, input=None, output=None, size=None):
      self.input = input if input is not None else []
      self.output = output if output is not None else []
      self.type = type
      self.is_delete = False
      self.size = size
      if type == LayerType.attention.value:
          self.input_size = 2
          self.output_size = 1
      elif type == LayerType.rnn.value:
          self.input_size = 1
          self.output_size = 1
      elif type == LayerType.self_attention.value:
          self.input_size = 1
          self.output_size = 1
      elif type == LayerType.input.value:
          self.input_size = 0
          self.output_size = 1
      elif type == LayerType.output.value:
          self.input_size = 1
          self.output_size = 0
      else:
          print(type)
  
imports: import copy
  import json
  import random
  from enum import Enum, unique
label_desc: Use image node_id 1 to create a new Layer object from inherited base classes: object with example: obj = Layer(type, input, output, size)