code: def _format_to_list(target, rank, default_pad=0):
      if isinstance(target, int):
          list_target = [target] * rank
      else:
          list_target = target
          if len(target) != rank:
              list_target = [
                  default_pad if not len(target) else target[0]
              ] * rank
      return list_target
  
imports: import sys
  import os
  import time
  import math
  from cntk.contrib.crosstalkcaffe.unimodel import cntkmodel
  from cntk.contrib.crosstalkcaffe.adapter import baseadapter
  from .None import caffeimpl
label_desc: Use image node_id 1 for calling a global function with example usage: _format_to_list(target, rank, default_pad) and returns: list_target