def _maybe_handle(self, prefix, handler, path, params, data=None):
    if path.startswith(prefix):
      relpath = path[len(prefix):]
      if data:
        handler(relpath, params, data)
      else:
        handler(relpath, params)
      return True
    else:
      return False
Apply the handler if the prefix matches.
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/reporting/reporting_server.py/PantsHandler._maybe_handle