docstr: Send a bytestring message to the client without attempting to
  serialize as JSON.
  
  Perspective's client expects two messages to be sent when a binary
  payload is expected: the first message is a JSON-serialized string with
  the message's `id` and `msg`, and the second message is a bytestring
  without any additional metadata. Implementations of the `post_callback`
  should have an optional kwarg named `binary`, which specifies whether
  `data` is a bytestring or not.
  
  Args:
      binary (bytes, bytearray) : a byte message to be passed to the client.
      msg (dict) : the original message that generated the binary
          response from Perspective.
      post_callback (callable) : a function that passes data to the
          client, with a `binary` (bool) kwarg that allows it to pass
          byte messages without serializing to JSON.
docstr_tok: ["Send","a","bytestring","message","to","the","client","without","attempting","to","serialize","as","JSON",".","Perspective","'s","client","expects","two","messages","to","be","sent","when","a","binary","payload","is","expected",":","the","first","message","is","a","JSON-serialized","string","with","the","message","'s","`","id","`","and","`","msg","`",",","and","the","second","message","is","a","bytestring","without","any","additional","metadata",".","Implementations","of","the","`","post_callback","`","should","have","an","optional","kwarg","named","`","binary","`",",","which","specifies","whether","`","data","`","is","a","bytestring","or","not",".","Args",":","binary","(","bytes",",","bytearray",")",":","a","byte","message","to","be","passed","to","the","client",".","msg","(","dict",")",":","the","original","message","that","generated","the","binary","response","from","Perspective",".","post_callback","(","callable",")",":","a","function","that","passes","data","to","the","client",",","with","a","`","binary","`","(","bool",")","kwarg","that","allows","it","to","pass","byte","messages","without","serializing","to","JSON","."]
code: def _process_bytes(self, binary, msg, post_callback):
      """Send a bytestring message to the client without attempting to
      serialize as JSON.
  
      Perspective's client expects two messages to be sent when a binary
      payload is expected: the first message is a JSON-serialized string with
      the message's `id` and `msg`, and the second message is a bytestring
      without any additional metadata. Implementations of the `post_callback`
      should have an optional kwarg named `binary`, which specifies whether
      `data` is a bytestring or not.
  
      Args:
          binary (bytes, bytearray) : a byte message to be passed to the client.
          msg (dict) : the original message that generated the binary
              response from Perspective.
          post_callback (callable) : a function that passes data to the
              client, with a `binary` (bool) kwarg that allows it to pass
              byte messages without serializing to JSON.
      """
      # Pass the total length of the binary to the client, so it knows to
      # wait until the arrow has been received in whole.
      msg["binary_length"] = len(binary)
  
      post_callback(json.dumps(msg, cls=DateTimeEncoder))
      post_callback(binary, binary=True)
  
imports: import datetime
  import json
  import logging
  from collections import deque
  from functools import partial
  from ..core.exception import PerspectiveError
  from ..table import PerspectiveCppError, Table
  from ..table._callback_cache import _PerspectiveCallBackCache
  from ..table._date_validator import _PerspectiveDateValidator
label_desc: Use image node_id 7 for calling the _PerspectiveManagerInternal obj's underlying member method code with example usage: obj._process_bytes(binary, msg, post_callback) without return types