code: def to_kv(
      self, exclude_fields: Tuple[str], accept_value_types: Tuple[Type]
  ):
      fields = self._FIELDS
      kv = {}
      no_value = object()
      for name, field in fields.items():
          if name not in exclude_fields:
              value = getattr(self, name, no_value)
              if value is not no_value and isinstance(
                  value, accept_value_types
              ):
                  kv[field.tag] = value
      return kv
  
imports: from typing import Dict, Tuple, Type
  from ..serialization.serializables import Serializable, StringField
  from ..serialization.serializables.core import SerializableSerializer
  from ..utils import tokenize
label_desc: Use image node_id 15 for calling the Base obj's underlying member method code with example usage: obj.to_kv(exclude_fields, accept_value_types) and returns: kv