<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _options_operation(self, api_interface, path, methods):
 # type: (ApiInterfaceBase, UrlPath, List[api.Method]) -> None """ Generate an options operation for the specified path """

        # 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'