<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def block(self):
        '''
        pfctl -a switchyard -f- < rules.txt
        pfctl -a switchyard -F rules
        pfctl -t switchyard -F r
        '''
        st,output = _runcmd("/sbin/pfctl -aswitchyard -f -", self._rules)
        log_debug("Installing rules: {}".format(output))