code: def ones(x):
      one = []
      for i, v in enumerate(x.shape[:-1]):
          if v == 1:
              one.append(i)
      return one
  
file_path: pytorch-struct/torch_struct/semirings/checkpoint.py
imports: import torch
label_desc: Use image node_id 5 for calling a global function with example usage: ones(x) and returns: one