<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _unify_rows(a):
 """Unify lengths of each row of a."""

  lens = np.fromiter(map(len, a), np.int32)
  if not (lens[0] == lens).all():
    out = np.zeros((len(a), lens.max()), np.float32)
    for i, row in enumerate(a):
      out[i, :lens[i]] = row
  else:
    out = np.float32(a)
  return out