def MakeOldStyle(newstyle_fieldpath):
  """New style: a.b.000003.c -> old style: a.b[3].c .

  Args:
      newstyle_fieldpath: new-style path to convert.
  Returns:
      Old-style version of path.
  """
  tokens = newstyle_fieldpath.split(".")
  oldstyle = ""
  is_first = True
  for token in tokens:
    if token.isdigit():
      assert not is_first, "indexes are never first"
      oldstyle += "[%d]" % int(token)
    else:
      oldstyle += token if is_first else "." + token
      is_first = False
  return oldstyle