def get_binary_content(content):
    if isinstance(content, text_type):
        return content.encode('utf-8')
    return content
Get binary content for binary_writer.
dataset/ETHPy150Open fengsp/plan/plan/_compat.py/get_binary_content