def _HandleWildcardCases(first_handler, second_handler):
  merged_handlers = set()

  if len(first_handler.pattern) <= 1 or len(second_handler.pattern) <= 1:
    return merged_handlers

  if (first_handler.pattern[-1], second_handler.pattern[0]) != ('*', '*'):
    return merged_handlers



  first_no_star = first_handler.pattern[:-1]
  merged_handlers.add(SimpleHandler(first_no_star + second_handler.pattern))
  if second_handler.MatchesString(first_no_star):


    merged_handlers.add(SimpleHandler(first_no_star))
  return merged_handlers
Handle cases with trailing and leading wildcards.
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/handler.py/_HandleWildcardCases