docs: def v1_label_direct(request, response, visid_to_dbid, dbid_to_visid,
                      label_store, cid, subid=None):
      '''Return directly connected labels.
  
      The routes for this endpoint are
      ``/dossier/v1/label/<cid>/direct`` and
      ``/dossier/v1/label/<cid>/subtopic/<subid>/direct``.
  
      This returns all directly connected labels for ``cid``. Or, if
      a subtopic id is given, then only directly connected labels for
      ``(cid, subid)`` are returned.
  
      The data returned is a JSON list of labels. Each label is a
      dictionary with the following keys: ``content_id1``,
      ``content_id2``, ``subtopic_id1``, ``subtopic_id2``,
      ``annotator_id``, ``epoch_ticks`` and ``value``.
      '''
      lab_to_json = partial(label_to_json, dbid_to_visid)
      ident = make_ident(visid_to_dbid(cid), subid)
      labs = imap(lab_to_json, label_store.directly_connected(ident))
      return list(paginate(request, response, labs))