docs: def encode_bucket_props(self, props, msg):
          """
          Encodes a dict of bucket properties into the protobuf message.
  
          :param props: bucket properties
          :type props: dict
          :param msg: the protobuf message to fill
          :type msg: riak.pb.riak_pb2.RpbSetBucketReq
          """
          for prop in NORMAL_PROPS:
              if prop in props and props[prop] is not None:
                  if isinstance(props[prop], six.string_types):
                      setattr(msg.props, prop, str_to_bytes(props[prop]))
                  else:
                      setattr(msg.props, prop, props[prop])
          for prop in COMMIT_HOOK_PROPS:
              if prop in props:
                  setattr(msg.props, 'has_' + prop, True)
                  self.encode_hooklist(props[prop], getattr(msg.props, prop))
          for prop in MODFUN_PROPS:
              if prop in props and props[prop] is not None:
                  self.encode_modfun(props[prop], getattr(msg.props, prop))
          for prop in QUORUM_PROPS:
              if prop in props and props[prop] not in (None, 'default'):
                  value = self.encode_quorum(props[prop])
                  if value is not None:
                      if isinstance(value, six.string_types):
                          setattr(msg.props, prop, str_to_bytes(value))
                      else:
                          setattr(msg.props, prop, value)
          if 'repl' in props:
              msg.props.repl = REPL_TO_PB[props['repl']]
  
          return msg