code: def _get_records(event):
      
      try:
          recs, _ = unpack_kinesis_event(event, deserializer=None)
      except KeyError:
          # If not a Kinesis event, just unpack the records
          recs = event["Records"]
      return recs
docs: Get records from an AWS Lambda trigger event.