<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process_text(text, out_file='sofia_output.json', auth=None):
 """Return processor by processing text given as a string. Parameters text : str A string containing the text to be processed with Sofia. out_file : Optional[str] The path to a file to save the reader's output into. Default: sofia_output.json auth : Optional[list] A username/password pair for the Sofia web service. If not given, the SOFIA_USERNAME and SOFIA_PASSWORD values are loaded from either the INDRA config or the environment. Returns ------- sp : indra.sources.sofia.processor.SofiaProcessor A SofiaProcessor object which has a list of extracted INDRA Statements as its statements attribute. If the API did not process the text, None is returned. """

    text_json = {'text': text}
    if not auth:
        user, password = _get_sofia_auth()
    else:
        user, password = auth
    if not user or not password:
        raise ValueError('Could not use SOFIA web service since'
                         ' authentication information is missing. Please'
                         ' set SOFIA_USERNAME and SOFIA_PASSWORD in the'
                         ' INDRA configuration file or as environmental'
                         ' variables.')
    json_response, status_code, process_status = \
        _text_processing(text_json=text_json, user=user, password=password)

    # Check response status
    if process_status != 'Done' or status_code != 200:
        return None

    # Cache reading output
    if out_file:
        with open(out_file, 'w') as fh:
            json.dump(json_response, fh, indent=1)

    return process_json(json_response)