<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_arn(name, region=None, key=None, keyid=None, profile=None):
    '''
    Returns the full ARN for a given topic name.

    CLI example::

        salt myminion boto_sns.get_arn mytopic
    '''
    if name.startswith('arn:aws:sns:'):
        return name

    account_id = __salt__['boto_iam.get_account_id'](
        region=region, key=key, keyid=keyid, profile=profile
    )
    return 'arn:aws:sns:{0}:{1}:{2}'.format(_get_region(region, profile),
                                            account_id, name)