<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_backends(self):
 """ Check that every backend in roles and attributes is declared in main configuration """

        backends = self.backends_params.keys()
        for b in self.roles.get_backends():
            if b not in backends:
                raise MissingBackend(b, 'role')
        for b in self.attributes.get_backends():
            if b not in backends:
                raise MissingBackend(b, 'attribute')