code: def set_size(self, graph_id, size):
          '''
          Set size.
          '''
          if self.graph_type == LayerType.attention.value:
              if self.input[0] == graph_id:
                  self.size = size
          if self.graph_type == LayerType.rnn.value:
              self.size = size
          if self.graph_type == LayerType.self_attention.value:
              self.size = size
          if self.graph_type == LayerType.output.value:
              if self.size != size:
                  return False
          return Truf set_size(self, graph_id, size):
          '''
          Set size.
          '''
          if self.graph_type == LayerType.attention.value:
              if self.input[0] == graph_id:
                  self.size = size
          if self.graph_type == LayerType.rnn.value:
              self.size = size
          if self.graph_type == LayerType.self_attention.value:
              self.size = size
          if self.graph_type == LayerType.output.value:
              if self.size != size:
                  return False
          return True
docs: Set size.