code: def encodeDeltaRunAsBytes_(deltas, offset, bytearr):
      pos = offset
      numDeltas = len(deltas)
      while pos < numDeltas:
          value = deltas[pos]
          if not (-128 <= value <= 127):
              break
          # Within a byte-encoded run of deltas, a single zero
          # is best stored literally as 0x00 value. However,
          # if are two or more zeroes in a sequence, it is
          # better to start a new run. For example, the sequence
          # of deltas [15, 15, 0, 15, 15] becomes 6 bytes
          # (04 0F 0F 00 0F 0F) when storing the zero value
          # literally, but 7 bytes (01 0F 0F 80 01 0F 0F)
          # when starting a new run.
          if (
              value == 0
              and pos + 1 < numDeltas
              and deltas[pos + 1] == 0
          ):
              break
          pos += 1
      runLength = pos - offset
      while runLength >= 64:
          bytearr.append(63)
          bytearr.extend(array.array("b", deltas[offset : offset + 64]))
          offset += 64
          runLength -= 64
      if runLength:
          bytearr.append(runLength - 1)
          bytearr.extend(array.array("b", deltas[offset:pos]))
      return pos
  
imports: from fontTools.misc.fixedTools import fixedToFloat, floatToFixed, floatToFixedToStr, strToFixedToFloat, otRound
  from fontTools.misc.textTools import safeEval
  import array
  from collections import Counter, defaultdict
  import io
  import logging
  import struct
  import sys
label_desc: Use image node_id 17 for calling the TupleVariation obj's underlying member method code with example usage: obj.encodeDeltaRunAsBytes_(deltas, offset, bytearr) and returns: pos