code: def test_topological_sort_longest_path_single_node(self):
      # single node
      m = model_helper.ModelHelper()
      # 0
      m.Copy("conv0_w_comp", "conv0_w")
  
      g = memonger.compute_interference_graph(m.net.Proto().op)
  
      orders_org = memonger.topological_sort_traversal(g)
      orders_gt_org = [0]
      self.assertEqual(orders_gt_org, list(orders_org))
  
      orders = memonger.topological_sort_traversal_longest_path(g)
      # longer path is in front of the shorter one
      orders_gt = [0]
      self.assertEqual(orders_gt, list(orders))
  
imports: import numpy
  from caffe2.python import workspace, memonger, core, model_helper, brew
  from caffe2.proto import caffe2_pb2
  import caffe2.python.hypothesis_test_util
  import hypothesis.strategies
  from hypothesis import given, settings
  import unittest
label_desc: Use image node_id 16 for calling the MemongerTest obj's underlying member method code with example usage: obj.test_topological_sort_longest_path_single_node() without return types