docs: def map_to_data_element(self, resource):
          """
          Maps the given resource to a data element tree.
          """
          trv = ResourceTreeTraverser(resource, self.as_pruning())
          visitor = DataElementBuilderResourceTreeVisitor(self)
          trv.run(visitor)
          return visitor.data_element