def read_file(fname, decode=True):
    'A helper to read file passing content via ensure_unicode\n\n    Parameters\n    ----------\n    decode: bool, optional\n      if False, no ensure_unicode and file content returned as bytes\n    '
    with open(fname, 'rb') as f:
        content = f.read()
    return (ensure_unicode(content) if decode else content)
A helper to read file passing content via ensure_unicode

Parameters
----------
decode: bool, optional
  if False, no ensure_unicode and file content returned as bytes
def read_file(fname, decode=True):
    'A helper to read file passing content via ensure_unicode\n\n    Parameters\n    ----------\n    decode: bool, optional\n      if False, no ensure_unicode and file content returned as bytes\n    '
    with open(fname, 'rb') as f:
        content = f.read()
    return (ensure_unicode(content) if decode else content)