code: def get_distinct_value_props(cls, sparql_endpoint_url='https://query.wikidata.org/sparql'):
          
          pcpid = config['PROPERTY_CONSTRAINT_PID']
          dvcqid = config['DISTINCT_VALUES_CONSTRAINT_QID']
          try:
              h = WikibaseHelper(sparql_endpoint_url)
              pcpid = h.get_pid(pcpid)
              dvcqid = h.get_qid(dvcqid)
          except Exception:
              warnings.warn("Unable to determine PIDs or QIDs for retrieving distinct value properties.\n" +
                    "Please set P2302 and Q21502410 in your wikibase or set `core_props` manually.\n" +
                    "Continuing with no core_props")
              cls.DISTINCT_VALUE_PROPS[sparql_endpoint_url] = set()
              return None
  
          query = "select ?p where {{?p wdt:{} wd:{}}}".format(pcpid, dvcqid)
          df = cls.execute_sparql_query(query, endpoint=sparql_endpoint_url, as_dataframe=True)
          if df.empty:
              warnings.warn("Warning: No distinct value properties found")
              cls.DISTINCT_VALUE_PROPS[sparql_endpoint_url] = set()
              return None
          df.p = df.p.str.rsplit("/", 1).str[-1]
          cls.DISTINCT_VALUE_PROPS[sparql_endpoint_url] = set(df.p)
docs: On wikidata, the default core IDs will be the properties with a distinct values constraint
          select ?p where {?p wdt:P2302 wd:Q21502410}
          See: https://www.wikidata.org/wiki/Help:Property_constraints_portal
          https://www.wikidata.org/wiki/Help:Property_constraints_portal/Unique_value