def _PyName(desc, pkg):
  """Return the Python name of the entity in |desc| from proto package |pkg|."""
  if not pkg: return desc.fqname
  assert desc.fqname.startswith(pkg)
  return desc.fqname[len(pkg)+1:]  # Add 1 for '.' between pkg and name.