<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_bundle(self, name=None, media_url=None, audio_channel=None, metadata=None, notify_url=None, external_id=None):
 """Create a new bundle. 'metadata' may be None, or an object that can be converted to a JSON string. See API documentation for restrictions. The conversion will take place before the API call. All other parameters are also optional. For information about these see https://api.clarify.io/docs#!/audio/v1audio_post_1. Returns a data structure equivalent to the JSON returned by the API. If the response status is not 2xx, throws an APIException. If the JSON to python data struct conversion fails, throws an APIDataException."""


        # Prepare the data we're going to include in our bundle creation.
        path = '/' + __api_version__ + '/' + BUNDLES_PATH

        data = None

        fields = {}
        if name is not None:
            fields['name'] = name
        if media_url is not None:
            fields['media_url'] = media_url
        if audio_channel is not None:
            fields['audio_channel'] = audio_channel
        if metadata is not None:
            fields['metadata'] = json.dumps(metadata)
        if notify_url is not None:
            fields['notify_url'] = notify_url
        if external_id is not None:
            fields['external_id'] = external_id

        if len(fields) > 0:
            data = fields

        raw_result = self.post(path, data)

        if raw_result.status < 200 or raw_result.status > 202:
            raise APIException(raw_result.status, raw_result.json)

        # Convert the JSON to a python data struct.

        return self._parse_json(raw_result.json)