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

def list_subscriptions_by_topic(TopicArn, region=None, key=None, keyid=None, profile=None):
    '''
    Returns a list of the subscriptions to a specific topic

    CLI example::

        salt myminion boto3_sns.list_subscriptions_by_topic mytopic region=us-east-1
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    NextToken = ''
    res = []
    try:
        while NextToken is not None:
            ret = conn.list_subscriptions_by_topic(TopicArn=TopicArn, NextToken=NextToken)
            NextToken = ret.get('NextToken', None)
            subs = ret.get('Subscriptions', [])
            res += subs
    except botocore.exceptions.ClientError as e:
        log.error('Failed to list subscriptions for SNS topic %s: %s', TopicArn, e)
        return None
    return res