def swift_module_name(label):
  """Returns a module name for the given label."""
  prefix = label.package.lstrip("//").replace("/", "_").replace("-", "_")
  suffix = label.name.replace("-", "_")
  if prefix:
     return (prefix + "_" + suffix)
  else:
     return suffix