code: def _send_script(self, client, uuid, chunk, key, chunk_status):
          
  
          conn_id = self._validate_connection('send_script', uuid, key)
          if conn_id is None:
              return
  
          conn_data = self._connections[uuid]
          conn_data['last_touch'] = monotonic()
  
          slug = self._build_device_slug(uuid)
  
          # Check and see if we have the entire script or if we need to accumulate it
          index, count = chunk_status
          if index == 0:
              conn_data['script'] = bytes()
  
          conn_data['script'] += chunk
  
          # If there is more than one chunk and we aren't on the last one, wait until we receive them
          # all before sending them on to the device as a unit
          if index != count - 1:
              return
  
          # Initialize our progress throttling system in case we need to throttle progress reports
          conn_data['last_progress'] = None
  
          try:
              resp = yield self._manager.send_script(conn_id, conn_data['script'], lambda x, y: self._notify_progress_async(uuid, client, x, y))
              yield None # Make sure we give time for any progress notifications that may have been queued to flush out
              conn_data['script'] = bytes()
          except Exception as exc:
              self._logger.exception("Error in manager send_script")
              resp = {'success': False, 'reason': "Internal error: %s" % str(exc)}
  
          payload = {'client': client, 'type': 'response', 'operation': 'send_script', 'success': resp['success']}
          if resp['success'] is False:
              payload['failure_reason'] = resp['reason']
  
          self._publish_response(slug, payload)
docs: Send a script to the connected device.
  
          Args:
              client (string): The client that sent the rpc request
              uuid (int): The id of the device we're opening the interface on
              chunk (bytes): The binary script to send to the device
              key (string): The key to authenticate the caller
              last_chunk (tuple): the chunk index and count of chunks of this script
                  so that we know to either accumulate it or send it on to the device
                  immediately.