code: def is_topology(self, layers=None):
      if layers == None:
          layers = self.layers
      layers_nodle = []
      xx = []
      for i in range(len(layers)):
          if layers[i].is_delete == False:
              layers_nodle.append(i)
      while True:
          flag_break = True
          layers_toremove = []
          for layer1 in layers_nodle:
              flag_arrive = True
              for layer2 in layers[layer1].input:
                  if layer2 in layers_nodle:
                      flag_arrive = False
              if flag_arrive == True:
                  for layer2 in layers[layer1].output:
                      if (
                          layers[layer2].set_size(
                              layer1, layers[layer1].size
                          )
                          == False
                      ):  # Size is error
                          return False
                  layers_toremove.append(layer1)
                  xx.append(layer1)
                  flag_break = False
          for layer in layers_toremove:
              layers_nodle.remove(layer)
          xx.append("|")
          if flag_break == True:
              break
      if (
          len(layers_nodle) > 0
      ):  # There is loop in graph || some layers can't to arrive
          return False
      return xx
  
imports: import copy
  import json
  import random
  from enum import Enum, unique
label_desc: Use image node_id 2 for calling the Graph obj's underlying member method code with example usage: obj.is_topology(layers) and returns: xx, False, False