def METHOD_NAME(dumper, data):
    """For use with yaml.dump to get mostly human-sensible results."""
    try:
        dlen = len(data.splitlines())
        if dlen > 1:
            return dumper.represent_scalar("tag:yaml.org,2002:str", data, style="|")
    except TypeError:
        return dumper.represent_scalar("tag:yaml.org,2002:str", data)
    return dumper.represent_scalar("tag:yaml.org,2002:str", data)