code: def stop(self):
      l = len(self.ind)
      mp = self.chkmin
      chkpts = [0, -l + mp, (-l + mp) // 2]
  
      if self.p.main:
          print("----------------------------------------")
          print("len ind %d == %d len self" % (l, len(self)))
          print("minperiod %d" % self.chkmin)
          print(
              "self.p.chknext %d nextcalls %d"
              % (self.p.chknext, self.nextcalls)
          )
  
          print("chkpts are", chkpts)
          for chkpt in chkpts:
              dtstr = self.data.datetime.date(chkpt).strftime(
                  "%Y-%m-%d"
              )
              print("chkpt %d -> %s" % (chkpt, dtstr))
  
          for lidx in range(self.ind.size()):
              chkvals = list()
              outtxt = "    ["
              for chkpt in chkpts:
                  valtxt = "'%f'" % self.ind.lines[lidx][chkpt]
                  outtxt += "'%s'," % valtxt
                  chkvals.append(valtxt)
  
                  outtxt = "    [" + ", ".join(chkvals) + "],"
  
              if lidx == self.ind.size() - 1:
                  outtxt = outtxt.rstrip(",")
  
              print(outtxt)
  
          print("vs expected")
  
          for chkval in self.p.chkvals:
              print(chkval)
  
      else:
          assert l == len(self)
          if self.p.chknext:
              assert self.p.chknext == self.nextcalls
          assert mp == self.p.chkmin
          for lidx, linevals in enumerate(self.p.chkvals):
              for i, chkpt in enumerate(chkpts):
                  chkval = "%f" % self.ind.lines[lidx][chkpt]
                  if not isinstance(linevals[i], tuple):
                      assert chkval == linevals[i]
                  else:
                      try:
                          assert chkval == linevals[i][0]
                      except AssertionError:
                          assert chkval == linevals[i][1]
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import datetime
  import os
  import os.path
  import sys
  import backtrader
  import backtrader.utils.flushfile
  from backtrader.metabase import ParamsBase
label_desc: Use image node_id 6 for calling the TestStrategy obj's underlying member method code with example usage: obj.stop() without return types