import yaml


def encode_yaml(yaml_dict):
  """Return dictionary as yaml string."""
  return yaml.safe_dump(yaml_dict, allow_unicode=True,
                        default_flow_style=False,
                        encoding='utf-8')