def _get_source_op_slices(op_slices, op_reg_manager):
  """Returns list of OpSlice that are sources.

  Args:
    op_slices: List of OpSlice.
    op_reg_manager: OpRegularizerManager to keep track of slicing.

  Returns:
    List of OpSlice that are sources.
  """
  op_groups = [op_reg_manager.get_op_group(op_slice)
               for op_slice in op_slices
               if op_reg_manager.get_op_group(op_slice) is not None]
  return list(set([source_op_slice for op_group in op_groups
                   for source_op_slice in op_group.source_op_slices]))