docs: def encode_leaf_node(value):
      """
      Serializes a leaf node
      """
      validate_is_bytes(value)
      if value is None or value == b'':
          raise ValidationError("Value of leaf node can not be empty")
      return LEAF_TYPE_PREFIX + value