class_docstr: Layer class, which contains the information of graph.
code: def __init__(
      self,
      graph_type,
      inputs=None,
      output=None,
      size=None,
      hash_id=None,
  ):
      self.input = inputs if inputs is not None else []
      self.output = output if output is not None else []
      self.graph_type = graph_type
      self.is_delete = False
      self.size = size
      self.hash_id = hash_id
      if graph_type == LayerType.attention.value:
          self.input_size = 2
          self.output_size = 1
      elif graph_type == LayerType.rnn.value:
          self.input_size = 1
          self.output_size = 1
      elif graph_type == LayerType.self_attention.value:
          self.input_size = 1
          self.output_size = 1
      elif graph_type == LayerType.input.value:
          self.input_size = 0
          self.output_size = 1
          if self.hash_id is None:
              hasher = hashlib.md5()
              hasher.update(np.random.bytes(100))
              self.hash_id = hasher.hexdigest()
      elif graph_type == LayerType.output.value:
          self.input_size = 1
          self.output_size = 0
      else:
          raise ValueError(
              "Unsupported LayerType: {}".format(graph_type)
          )
  
imports: import copy
  import hashlib
  import logging
  import json
  import random
  from collections import deque
  from enum import Enum, unique
  from typing import Iterable
  import numpy
label_desc: Use image node_id 1 to create a new Layer object from inherited base classes: object with example: obj = Layer(graph_type, inputs, output, size, hash_id)