def _load_file_from_gcs(gcs_file_path, credentials=None):
gcs_service = _get_storage_service(credentials)<EOL>bucket_name, object_name = gcs_file_path[len('<STR_LIT>'):].split('<STR_LIT:/>', <NUM_LIT:1>)<EOL>request = gcs_service.objects().get_media(<EOL>bucket=bucket_name, object=object_name)<EOL>file_handle = io.BytesIO()<EOL>downloader = MediaIoBaseDownload(file_handle, request, chunksize=<NUM_LIT> * <NUM_LIT>)<EOL>done = False<EOL>while not done:<EOL><INDENT>_, done = _downloader_next_chunk(downloader)<EOL><DEDENT>filevalue = file_handle.getvalue()<EOL>if not isinstance(filevalue, six.string_types):<EOL><INDENT>filevalue = filevalue.decode()<EOL><DEDENT>return six.StringIO(filevalue)<EOL>
Load context from a text file in gcs.

    Args:
      gcs_file_path: The target file path; should have the 'gs://' prefix.
      credentials: Optional credential to be used to load the file from gcs.

    Returns:
      The content of the text file as a string.