code: def _get_bundles_by_type(self, type):
          
          bundles = {}
          bundle_definitions = self.config.get(type)
          if bundle_definitions is None:
              return bundles
          # bundle name: common
          for bundle_name, paths in bundle_definitions.items():
              bundle_files = []
              # path: static/js/vendor/*.js
              for path in paths:
                  # pattern: /tmp/static/js/vendor/*.js
                  pattern = abspath = os.path.join(self.basedir, path)
                  # assetdir: /tmp/static/js/vendor
                  # assetdir contents:
                  #  - /tmp/static/js/vendor/t1.js
                  #  - /tmp/static/js/vendor/t2.js
                  #  - /tmp/static/js/vendor/index.html
                  assetdir = os.path.dirname(abspath)
                  # expanded_fnames after filtering using the pattern:
                  #  - /tmp/static/js/vendor/t1.js
                  #  - /tmp/static/js/vendor/t2.js
                  fnames = [os.path.join(assetdir, fname)
                            for fname in os.listdir(assetdir)]
                  expanded_fnames = fnmatch.filter(fnames, pattern)
                  bundle_files.extend(sorted(expanded_fnames))
              bundles[bundle_name] = bundle_files
  
          return bundles
docs: Get a dictionary of bundles for requested type.
  
          Args:
              type: 'javascript' or 'css'