<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _get_system():
    '''
    Get Pure Storage FlashArray configuration

    1) From the minion config
        pure_tags:
          fa:
            san_ip: management vip or hostname for the FlashArray
            api_token: A valid api token for the FlashArray being managed
    2) From environment (PUREFA_IP and PUREFA_API)
    3) From the pillar (PUREFA_IP and PUREFA_API)

  '''
    agent = {'base': USER_AGENT_BASE,
             'class': __name__,
             'version': VERSION,
             'platform': platform.platform()
             }

    user_agent = '{base} {class}/{version} ({platform})'.format(**agent)

    try:
        array = __opts__['pure_tags']['fa'].get('san_ip')
        api = __opts__['pure_tags']['fa'].get('api_token')
        if array and api:
            system = purestorage.FlashArray(array, api_token=api, user_agent=user_agent)
    except (KeyError, NameError, TypeError):
        try:
            san_ip = os.environ.get('PUREFA_IP')
            api_token = os.environ.get('PUREFA_API')
            system = purestorage.FlashArray(san_ip,
                                            api_token=api_token,
                                            user_agent=user_agent)
        except (ValueError, KeyError, NameError):
            try:
                system = purestorage.FlashArray(__pillar__['PUREFA_IP'],
                                                api_token=__pillar__['PUREFA_API'],
                                                user_agent=user_agent)
            except (KeyError, NameError):
                raise CommandExecutionError('No Pure Storage FlashArray credentials found.')

    try:
        system.get()
    except Exception:
        raise CommandExecutionError('Pure Storage FlashArray authentication failed.')
    return system