code: def encode_modfun(self, props, msg=None):
          
          if msg is None:
              msg = riak.pb.riak_pb2.RpbModFun()
          msg.module = str_to_bytes(props['mod'])
          msg.function = str_to_bytes(props['fun'])
          return msg
docs: Encodes a dict with 'mod' and 'fun' keys into a protobuf
          modfun pair. Used in bucket properties.
  
          :param props: the module/function pair
          :type props: dict
          :param msg: the protobuf message to fill
          :type msg: riak.pb.riak_pb2.RpbModFun
          :rtype riak.pb.riak_pb2.RpbModFun