<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_method(self, decl):
 """Find class method to call for declaration based on name."""

        name = decl.name
        method = None
        try:
            method = getattr(self, u'do_{}'.format(
                             (name).replace('-', '_')))
        except AttributeError:
            if name.startswith('data-'):
                method = getattr(self, 'do_data_any')
            elif name.startswith('attr-'):
                method = getattr(self, 'do_attr_any')
            else:
                log(WARN, u'Missing method {}'.format(
                                 (name).replace('-', '_')).encode('utf-8'))
        if method:
            self.record_coverage_line(decl.source_line)
            return method
        else:
            return lambda x, y, z: None