docs: def _check_obj_properties(self, pub, name="pub"):
          """
          Make sure, that `pub` has the right interface.
  
          Args:
              pub (obj): Instance which will be checked.
              name (str): Name of the instance. Used in exception. Default `pub`.
  
          Raises:
              InvalidType: When the `pub` is not instance of `obj_type`.
          """
          if not hasattr(pub, "indexes"):
              raise InvalidType("`%s` doesn't have .indexes property!" % name)
  
          if not pub.indexes:
              raise InvalidType("`%s.indexes` is not set!" % name)
  
          if not hasattr(pub, "project_key"):
              raise InvalidType(
                  "`%s` doesn't have .project_key property!" % name
              )
  
          if not pub.project_key:
              raise InvalidType("`%s.project_key` is not set!" % name)