code: def bundle(self, bundle_name):
          
          if self.args.bundle or self.tcex_json.get('package', {}).get('bundle', False):
              if self.tcex_json.get('package', {}).get('bundle_packages') is not None:
                  for bundle in self.tcex_json.get('package', {}).get('bundle_packages') or []:
                      bundle_name = bundle.get('name')
                      bundle_patterns = bundle.get('patterns')
  
                      bundle_apps = []
                      for app in self._app_packages:
                          for app_pattern in bundle_patterns:
                              p = re.compile(app_pattern, re.IGNORECASE)
                              if p.match(app):
                                  bundle_apps.append(app)
  
                      # bundle app in zip
                      if bundle_apps:
                          self.bundle_apps(bundle_name, bundle_apps)
              else:
                  self.bundle_apps(bundle_name, self._app_packages)
docs: Bundle multiple Job or Playbook Apps into a single zip file.
  
          Args:
              bundle_name (str): The output name of the bundle zip file.