def build_id_references_tree(id_references)
      tree = {}

      id_references.each do |id_reference|
        array_of_refs = id_reference.split('/')

        t = tree
        array_of_refs.each do |ref|
          t[ref] ||= {}
          t = t[ref]
        end
      end

      tree
    end
def build_id_references_tree(id_references)
      tree = {}

      id_references.each do |id_reference|
        array_of_refs = id_reference.split('/')

        t = tree
        array_of_refs.each do |ref|
          t[ref] ||= {}
          t = t[ref]
        end
      end

      tree
    end
Builds a tree from an array of id_references
 input: %w(lines/id lines/linked/id linked/id)
 output: {"lines"=>{"id"=>{}, "linked"=>{"id"=>{}}}, "linked"=>{"id"=>{}}}