<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main():
 """Sends release notifications to interested parties Currently this is an arm-internal slack channel. 1. assumes you've set a token for an authorised slack user/bot. 2. assumes said user/bot is already in channel. otherwise: https://github.com/slackapi/python-slackclient#joining-a-channel """

    slack_token = os.environ.get('SLACK_API_TOKEN')
    channel_id = os.environ.get('SLACK_CHANNEL', '#mbed-cloud-sdk')
    message = os.environ.get('SLACK_MESSAGE', (
        ':checkered_flag: New version of :snake: Python SDK released: *{version}* '
        '(<https://pypi.org/project/mbed-cloud-sdk/{version}/|PyPI>)'
    ))

    if not slack_token:
        print('no slack token')
        return

    version = os.environ.get('SLACK_NOTIFY_VERSION')
    if not version:
        try:
            import mbed_cloud
        except ImportError:
            pass
        else:
            version = mbed_cloud.__version__

    payload = message.format(version=version) if version else message

    print('notifying slack channel %s with payload:\n%s' % (channel_id, payload))

    sc = SlackClient(slack_token)
    sc.api_call(
        'chat.postMessage',
        channel=channel_id,
        text=payload,
    )