code: def sparse_to_dense(
      num_objects, num_detections, edges, assign_logits
  ):
      result = assign_logits.new_empty(
          num_detections, num_objects
      ).fill_(-INF)
      result[edges[0], edges[1]] = assign_logits
      return result
  
imports: import logging
  import pytest
  import torch
  from torch.autograd import grad
  import pyro
  import pyro.distributions
  from pyro.contrib.tracking.assignment import MarginalAssignment, MarginalAssignmentPersistent, MarginalAssignmentSparse
  from tests.common import assert_equal
label_desc: Use image node_id 4 for calling a global function with example usage: sparse_to_dense(num_objects, num_detections, edges, assign_logits) and returns: result