code: def wikibase_item_engine_factory(cls, mediawiki_api_url, sparql_endpoint_url, name='LocalItemEngine'):
          
  
          class SubCls(cls):
              def __init__(self, *args, **kwargs):
                  kwargs['mediawiki_api_url'] = mediawiki_api_url
                  kwargs['sparql_endpoint_url'] = sparql_endpoint_url
                  super(SubCls, self).__init__(*args, **kwargs)
  
          SubCls.__name__ = name
          return SubCls
docs: Helper function for creating a WDItemEngine class with arguments set for a different Wikibase instance than
          Wikidata.
          :param mediawiki_api_url: Mediawiki api url. For wikidata, this is: 'https://www.wikidata.org/w/api.php'
          :param sparql_endpoint_url: sparql endpoint url. For wikidata, this is: 'https://query.wikidata.org/sparql'
          :param name: name of the resulting class
          :return: a subclass of WDItemEngine with the mediawiki_api_url and sparql_endpoint_url arguments set