def make_collector(report, result):
    """Return JSON-serializable collector node."""
    collector = {
        'nodeid': report.nodeid,
        # This is the outcome of the collection, not the test outcome
        'outcome': report.outcome,
        'result': result,
    }
    if report.longrepr:
        # The collection report doesn't provide crash details, so we can only
        # add the message, but no traceback etc.
        collector['longrepr'] = str(report.longrepr)
    return collector