code: def run(self, endpoint, params=None):
      # Override to better manage exceptions.
      # Kept as much as possible close to the original
      self.connected = True
  
      params = params or {}
  
      ignore_heartbeat = None
      if "ignore_heartbeat" in params:
          ignore_heartbeat = params["ignore_heartbeat"]
  
      request_args = {}
      request_args["params"] = params
  
      url = "%s/%s" % (self.api_url, endpoint)
  
      while self.connected:
          # Added exception control here
          try:
              response = self.client.get(url, **request_args)
          except requests.RequestException as e:
              self.q.put(OandaRequestError().error_response)
              break
  
          if response.status_code != 200:
              self.on_error(response.content)
              break  # added break here
  
          # Changed chunk_size 90 -> None
          try:
              for line in response.iter_lines(chunk_size=None):
                  if not self.connected:
                      break
  
                  if line:
                      data = json.loads(line.decode("utf-8"))
                      if not (ignore_heartbeat and "heartbeat" in data):
                          self.on_success(data)
  
          except:  # socket.error has been seen
              self.q.put(OandaStreamError().error_response)
              break
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import collections
  from datetime import datetime, timedelta
  import time
  import json
  import threading
  import oandapy
  import requests
  import backtrader
  from backtrader.metabase import MetaParams
  from backtrader.utils.py3 import queue, with_metaclass
  from backtrader.utils import AutoDict
label_desc: Use image node_id 2 for calling the Streamer obj's underlying member method code with example usage: obj.run(endpoint, params) without return types