code: def _invalid_implementation(self, t, missing, mistyped, mismatched):
          
          assert missing or mistyped or mismatched, "Implementation wasn't invalid."
  
          message = "\nclass {C} failed to implement interface {I}:".format(
              C=getname(t),
              I=getname(self),
          )
          if missing:
              message += dedent(
                  """
  
                  The following methods of {I} were not implemented:
                  {missing_methods}"""
              ).format(
                  I=getname(self),
                  missing_methods=self._format_missing_methods(missing)
              )
  
          if mistyped:
              message += dedent(
                  """
  
                  The following methods of {I} were implemented with incorrect types:
                  {mismatched_types}"""
              ).format(
                  I=getname(self),
                  mismatched_types=self._format_mismatched_types(mistyped),
              )
  
          if mismatched:
              message += dedent(
                  """
  
                  The following methods of {I} were implemented with invalid signatures:
                  {mismatched_methods}"""
              ).format(
                  I=getname(self),
                  mismatched_methods=self._format_mismatched_methods(mismatched),
              )
          return InvalidImplementation(message)
docs: Make a TypeError explaining why ``t`` doesn't implement our interface.