docs: def update_available_item_relationships(app):
      """
      Update directive option_spec with custom relationships defined in
      configuration file ``traceability_relationships`` variable.  Both
      keys (relationships) and values (reverse relationships) are added.
  
      This handler should be called upon builder initialization, before
      processing any directive.
  
      Function also sets an environment variable ``relationships`` with
      the full list of relationships (with reverse relationships also as
      keys)
  
      """
      env = app.builder.env
      env.relationships = {}
  
      for rel in list(app.config.traceability_relationships.keys()):
          env.relationships[rel] = app.config.traceability_relationships[rel]
          env.relationships[app.config.traceability_relationships[rel]] = rel
  
      for rel in sorted(list(env.relationships.keys())):
          ItemDirective.option_spec[rel] = directives.unchanged