code: def add_provider(self, cls: Type[BaseProvider]) -> None:
          
          if inspect.isclass(cls):
              if not issubclass(cls, BaseProvider):
                  raise TypeError('The provider must be a '
                                  'subclass of BaseProvider')
              try:
                  meta = getattr(cls, 'Meta')
                  name = getattr(meta, 'name')
              except AttributeError:
                  name = cls.__name__.lower()
              setattr(self, name, cls(seed=self.seed))
          else:
              raise TypeError('The provider must be a class')
docs: Add a custom provider to Generic() object.
  
          :param cls: Custom provider.
          :return: None
          :raises TypeError: if cls is not class.