def _encode_binary(name, value, dummy0, dummy1):
 subtype = value.subtype
 if (subtype == 2):
  value = (_PACK_INT(len(value)) + value)
 return ((('\x05' + name) + _PACK_LENGTH_SUBTYPE(len(value), subtype)) + value)

def _encode_binary ( name , value , dummy0 , dummy1 ) : subtype = value . subtype if ( subtype == 2 ) : value = ( _PACK_INT ( len ( value ) ) + value ) return ( ( ( '\x05' + name ) + _PACK_LENGTH_SUBTYPE ( len ( value ) , subtype ) ) + value )
encode bson .