class_docstr: Metaclass of the Provider class, used mainly for ensuring
  that provider id's are wellformed and unique
class_docstr_tok: ["Metaclass","of","the","Provider","class",",","used","mainly","for","ensuring","that","provider","id","'s","are","wellformed","and","unique"]
code: def __new__(cls, name, bases, d):
      new_class = super(MetaProvider, cls).__new__(cls, name, bases, d)
      if new_class in implementations(IProvider):
          id = str(new_class.id())
          if id in _providers:
              # Doctest test can duplicate a provider
              # This can be identify by the conditon "module == '__main__'"
              new_path = os.path.realpath(inspect.getfile(new_class))
              id_path = os.path.realpath(inspect.getfile(_provider[id]))
              if new_class.__module__ == "__main__":
                  new_class = _provider[id]
              elif _provider[id].__module__ == "__main__":
                  pass
              elif new_path == id_path:
                  new_class = _provider[id]
              else:
                  raise ApiError(
                      "%s at %s and %s at %s have the same id: '%s'"
                      % (
                          new_class.__name__,
                          new_path,
                          _provider[id].__name__,
                          id_path,
                          id,
                      )
                  )
          if not MetaProvider.valid_id.match(id):
              raise ApiError(
                  "%s has a malformed id: '%s'"
                  % (new_class.__name__, id)
              )
  
          _providers[id] = new_class
  
      return new_class
  
file_path: TimeSide/timeside/core/provider.py
imports: from .component import Component, MetaComponent, abstract
  from .component import implements, implementations, interfacedoc
  from .api import IProvider
  from .exceptions import Error, PIDError, ApiError
  from .tools.parameters import HasParam
  import re
  import youtube_dl
  from requests import get
  import os
label_desc: Use image node_id 1 for calling the MetaProvider obj's underlying member method code with example usage: obj.__new__(cls, name, bases, d) and returns: new_class