code: def unroll_elmo(v, placeholders):
      if len(v.shape) <= 2:
          if placeholders > 0:
              if len(v.shape) == 1:
                  v = v[:-placeholders]
              else:
                  v = v[:, :-placeholders]
          return np.asarray(np.split(v, 3, axis=-1))
      elif len(v.shape) == 3:
          result = np.zeros(
              (v.shape[0], 3, v.shape[1], int(v.shape[2] / 3)),
              dtype=v.dtype,
          )
          for i in xrange(v.shape[0]):
              if placeholders > 0:
                  new_v = v[i][:, :-placeholders]
              else:
                  new_v = v[i]
              result[i] = np.asarray(np.split(new_v, 3, axis=-1))
          return result
      else:
          return v
  
file_path: magnitude/pymagnitude/converter_shared.py
imports: import hashlib
  import numpy
  import os
  from itertools import islice, chain
label_desc: Use image node_id 6 for calling a global function with example usage: unroll_elmo(v, placeholders) and returns: np, result, v