code: def next(self):
      if self.p.printout:
          # Print only 1st data ... is just a check that things are running
          txtfields = list()
          txtfields.append("%04d" % len(self))
          txtfields.append(self.data.datetime.datetime(0).isoformat())
          txtfields.append("%.2f" % self.data0.open[0])
          txtfields.append("%.2f" % self.data0.high[0])
          txtfields.append("%.2f" % self.data0.low[0])
          txtfields.append("%.2f" % self.data0.close[0])
          txtfields.append("%.2f" % self.data0.volume[0])
          txtfields.append("%.2f" % self.data0.openinterest[0])
          print(",".join(txtfields))
  
      # Data 0
      for data in self.datas:
          toss = random.randint(1, 10)
          curpos = self.getposition(data)
          if curpos.size:
              if toss > 5:
                  size = curpos.size // 2
                  self.sell(data=data, size=size)
                  if self.p.printout:
                      print("SELL {} @%{}".format(size, data.close[0]))
  
          elif toss < 5:
              self.buy(data=data, size=self.p.stake)
              if self.p.printout:
                  print(
                      "BUY  {} @%{}".format(self.p.stake, data.close[0])
                  )
  
file_path: backtrader/samples/pyfoliotest/pyfoliotest.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import argparse
  import datetime
  import random
  import backtrader
label_desc: Use image node_id 3 for calling the St obj's underlying member method code with example usage: obj.next() without return types