def METHOD_NAME(session):
  results = session.query(f"""
    {PREFIXES}
    SELECT ?S ?p (COUNT(*) as ?n)
    {session.graphs}
    WHERE {{
      ?s ?p ?_ .
      ?s a  ?S .
    }}
    GROUP BY ?S ?p
    """)
  print('Data properties: ', len(results))
  properties = {}
  for result in results:
      t = urlparse(result["S"]["value"])
      p = urlparse(result["p"]["value"])
      n = result["n"]["value"]
      if not session.has_type(t, CLASS) or not session.has_type(p, DATATYPE_PROPERTY):
        continue
      properties.setdefault(t, {})[p] = n
  return properties