class_docstr: Parses a CSV file according to the order and field presence defined by the
  parameters
  
  Specific parameters (or specific meaning):
  
    - ``dataname``: The filename to parse or a file-like object
  
    - The lines parameters (datetime, open, high ...) take numeric values
  
      A value of -1 indicates absence of that field in the CSV source
  
    - If ``time`` is present (parameter time >=0) the source contains
      separated fields for date and time, which will be combined
  
    - ``nullvalue``
  
      Value that will be used if a value which should be there is missing
      (the CSV field is empty)
  
    - ``dtformat``: Format used to parse the datetime CSV field. See the
      python strptime/strftime documentation for the format.
  
      If a numeric value is specified, it will be interpreted as follows
  
        - ``1``: The value is a Unix timestamp of type ``int`` representing
          the number of seconds since Jan 1st, 1970
  
        - ``2``: The value is a Unix timestamp of type ``float``
  
      If a **callable** is passed
  
        - it will accept a string and return a `datetime.datetime` python
          instance
  
    - ``tmformat``: Format used to parse the time CSV field if "present"
      (the default for the "time" CSV field is not to be present)
code: def _loadline(self, linetokens):
      # Datetime needs special treatment
      dtfield = linetokens[self.p.datetime]
      if self._dtstr:
          dtformat = self.p.dtformat
  
          if self.p.time >= 0:
              # add time value and format if it's in a separate field
              dtfield += "T" + linetokens[self.p.time]
              dtformat += "T" + self.p.tmformat
  
          dt = datetime.strptime(dtfield, dtformat)
      else:
          dt = self._dtconvert(dtfield)
  
      if self.p.timeframe >= TimeFrame.Days:
          # check if the expected end of session is larger than parsed
          if self._tzinput:
              dtin = self._tzinput.localize(dt)  # pytz compatible-ized
          else:
              dtin = dt
  
          dtnum = date2num(dtin)  # utc'ize
  
          dteos = datetime.combine(dt.date(), self.p.sessionend)
          dteosnum = self.date2num(dteos)  # utc'ize
  
          if dteosnum > dtnum:
              self.lines.datetime[0] = dteosnum
          else:
              # Avoid reconversion if already converted dtin == dt
              self.l.datetime[0] = (
                  date2num(dt) if self._tzinput else dtnum
              )
      else:
          self.lines.datetime[0] = date2num(dt)
  
      # The rest of the fields can be done with the same procedure
      for linefield in (
          x for x in self.getlinealiases() if x != "datetime"
      ):
          # Get the index created from the passed params
          csvidx = getattr(self.params, linefield)
  
          if csvidx is None or csvidx < 0:
              # the field will not be present, assignt the "nullvalue"
              csvfield = self.p.nullvalue
          else:
              # get it from the token
              csvfield = linetokens[csvidx]
  
          if csvfield == "":
              # if empty ... assign the "nullvalue"
              csvfield = self.p.nullvalue
  
          # get the corresponding line reference and set the value
          line = getattr(self.lines, linefield)
          line[0] = float(float(csvfield))
  
      return True
  
file_path: backtrader/backtrader/feeds/csvgeneric.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from datetime import datetime
  import itertools
  from ..None import feed, TimeFrame
  from ..utils import date2num
  from ..utils.py3 import integer_types, string_types
label_desc: Use image node_id 2 for calling the GenericCSVData obj's underlying member method code with example usage: obj._loadline(linetokens) and returns: True