def _get_signal_handler(self, handler):
if not handler:<EOL><INDENT>result = signal.SIG_IGN<EOL><DEDENT>elif isinstance(handler, string_types):<EOL><INDENT>result = getattr(self, handler)<EOL><DEDENT>else:<EOL><INDENT>result = handler<EOL><DEDENT>return result<EOL>
get the callback function for handler

        If the handler is None, returns signal.SIG_IGN.
        If the handler is a string, return the matching attribute of this
        instance if possible.
        Else return the handler itself.

        :param handler:
        :type handler: str, None, function
        :return: function