code: def _encode_binary(name, value, dummy0, dummy1):
      
      subtype = value.subtype
      if subtype == 2:
          value = _PACK_INT(len(value)) + value
      return b"\x05" + name + _PACK_LENGTH_SUBTYPE(len(value), subtype) + value
docs: Encode bson.binary.Binary.