code: def wikidata(self, title, wikibase=None):
          
          self.domain = 'www.wikidata.org'
          self.uri = self.wiki_uri(self.domain)
  
          query = self.WIKIDATA.substitute(
              WIKI=self.uri,
              ENDPOINT=self.endpoint,
              LANG=self.variant or self.lang,
              PROPS="aliases|info|claims|descriptions|labels|sitelinks")
  
          if wikibase:
              query += "&ids=%s" % wikibase
          elif title:
              title = safequote(title)
              query += "&sites=%swiki" % self.lang
              query += "&titles=%s" % title
  
          self.set_status('wikidata', wikibase or title)
  
          return query
docs: Returns Wikidata query string