parameters: (filename, binary_mode=False)
return_statement: return f.read()
docstring: Reads the entire contents of a file to a string.
  
    Args:
      filename: string, path to a file
      binary_mode: whether to open the file in binary mode or not. This changes
        the type of the object returned.
  
    Returns:
      contents of the file as a string or bytes.
  
    Raises:
      errors.OpError: Raises variety of errors that are subtypes e.g.
      `NotFoundError` etc.
docstring_summary: Reads the entire contents of a file to a string.
docstring_tokens: Reads the entire contents of a file to a string .
function: def read_file_to_string(filename, binary_mode=False):
    """Reads the entire contents of a file to a string.
  
    Args:
      filename: string, path to a file
      binary_mode: whether to open the file in binary mode or not. This changes
        the type of the object returned.
  
    Returns:
      contents of the file as a string or bytes.
  
    Raises:
      errors.OpError: Raises variety of errors that are subtypes e.g.
      `NotFoundError` etc.
    """
    if binary_mode:
      f = FileIO(filename, mode="rb")
    else:
      f = FileIO(filename, mode="r")
    return f.read()
function_tokens: def read_file_to_string ( filename , binary_mode = False ) : if binary_mode : f = FileIO ( filename , mode = "rb" ) else : f = FileIO ( filename , mode = "r" ) return f . read ( )