class_docstr: S3Payload class
class_docstr_tok: ["S3Payload","class"]
docstr: Read the contents of the downloaded S3 file using the open file handle
  
  Args:
      open_file (file-like object): File handle from which to read the data
  
  Yields:
      tuple: line number, contents of the line being read
docstr_tok: ["Read","the","contents","of","the","downloaded","S3","file","using","the","open","file","handle","Args",":","open_file","(","file-like","object",")",":","File","handle","from","which","to","read","the","data","Yields",":","tuple",":","line","number",",","contents","of","the","line","being","read"]
code: def _read_downloaded_object(cls, open_file):
      """Read the contents of the downloaded S3 file using the open file handle
  
      Args:
          open_file (file-like object): File handle from which to read the data
  
      Yields:
          tuple: line number, contents of the line being read
      """
      reader = cls._gz_reader(open_file)
      try:
          # Try to just load the reader as regular json first
          yield 1, json.load(reader)
          return
      except ValueError:
          pass
  
      # Iterate over the lines, returning each
      # This could be dicts from a jsonlines.Reader, or raw strings
      for line_num, line in enumerate(
          cls._jsonlines_reader(reader), start=1
      ):
          yield line_num, line.strip() if isinstance(
              line, str
          ) else line
  
imports: import json
  import logging
  import urllib.request
  import urllib.parse
  import urllib.error
  import gzip
  import os
  import tempfile
  import subprocess
  import time
  import boto3
  from botocore.exceptions import ClientError
  import jsonlines
  from streamalert.classifier.payload.payload_base import PayloadRecord, RegisterInput, StreamPayload
  from streamalert.shared import CLASSIFIER_FUNCTION_NAME
  from streamalert.shared.logger import get_logger
  from streamalert.shared.metrics import MetricLogger
label_desc: Use image node_id 12 for calling the S3Payload obj's underlying member method code with example usage: obj._read_downloaded_object(cls, open_file) without return types