code: def _read_activity_types():
      
      this_dir = os.path.dirname(os.path.abspath(__file__))
      ac_file = os.path.join(this_dir, os.pardir, 'resources',
                             'activity_hierarchy.rdf')
      g = rdflib.Graph()
      with open(ac_file, 'r'):
          g.parse(ac_file, format='nt')
      act_types = set()
      for s, _, o in g:
          subj = s.rpartition('/')[-1]
          obj = o.rpartition('/')[-1]
          act_types.add(subj)
          act_types.add(obj)
      return sorted(list(act_types))
docs: Read types of valid activities from a resource file.