code: def read_file(filename, binary_mode=False):
    
    mode = 'rb' if binary_mode else 'r'
    with open(filename, mode) as f:
      return f.read()
docs: Read and return the contents of a file in a single file.read().
  
    :param string filename: The filename of the file to read.
    :param bool binary_mode: Read from file as bytes or unicode.
    :returns: The contents of the file.
    :rtype: string