def _GenerateNamespacePrefixAndSuffix(namespace):
  """Generates the namespace prefix and suffix for |namespace|.

  Args:
    namespace: A string corresponding to the namespace name. May be empty.

  Returns:
    A tuple of strings corresponding to the namespace prefix and suffix for
    putting the code in the corresponding namespace in C++. If namespace is
    the empty string, both returned strings are empty too.
  """
  if not namespace:
    return "", ""
  return "namespace %s {\n\n" % namespace, "\n}  // namespace %s\n" % namespace