code: def signed_varint(i):
      """Zig-zag encodes a signed integer into a varint."""
  
      if i >= 0:
          return varint(i << 1)
      return varint((i << 1) ^ (~0))
  
file_path: whoosh/src/whoosh/util/varints.py
imports: from array import array
  from whoosh.compat import array_tobytes, xrange
label_desc: Use image node_id 4 for calling a global function with example usage: signed_varint(i) and returns: varint, varint