code: def generate_payload(exclude=None, **kwargs):
      
      if exclude is None:
          exclude = []
      return {key: value for key, value in kwargs.items() if
              key not in exclude + DEFAULT_FILTER
              and value is not None
              and not key.startswith('_')}
docs: Generate payload
  
      Usage: payload = generate_payload(**locals(), exclude=['foo'])
  
      :param exclude:
      :param kwargs:
      :return: dict