<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apply(self, flag_set: AbstractSet[Flag], operand: AbstractSet[Flag]) \ -> FrozenSet[Flag]: """Apply the flag operation on the two sets, returning the result. Args: flag_set: The flag set being operated on. operand: The flags to use as the operand. """

        if self == FlagOp.ADD:
            return frozenset(flag_set | operand)
        elif self == FlagOp.DELETE:
            return frozenset(flag_set - operand)
        else:  # op == FlagOp.REPLACE
            return frozenset(operand)