code: def _options_operation(self, api_interface, path, methods):
          # type: (ApiInterfaceBase, UrlPath, List[api.Method]) -> None
          
          # Trim off path prefix.
          if path.startswith(api_interface.path_prefix):
              path = path[len(api_interface.path_prefix):]
  
          methods = set(methods)
          methods.add(api.Method.OPTIONS)
  
          # Apply operation decorator
          operation_decorator = api_interface.operation(
              path, api.Method.OPTIONS, middleware=[_MethodsMiddleware(methods)])
          operation = operation_decorator(self.cors_options)
          operation.operation_id = path.format(separator='.') + '.cors_options'
docs: Generate an options operation for the specified path