'Checks if the current class supports this privilege escalation method'

def _become_method_supported(self):

    if (self._play_context.become_method in self.become_methods):
        return True
    raise AnsibleError(('Internal    Error:    this    connection    module    does    not    support    running    commands    via    %s' % self._play_context.become_method))
