code: def _jobs_to_do(self, restrictions):
          
          if self.restriction:
              raise DataJointError('Cannot call populate on a restricted table. '
                                   'Instead, pass conditions to populate() as arguments.')
          todo = self.key_source
          if not isinstance(todo, QueryExpression):
              raise DataJointError('Invalid key_source value')
          # check if target lacks any attributes from the primary key of key_source
          try:
              raise DataJointError(
                  'The populate target lacks attribute %s from the primary key of key_source' % next(
                      name for name in todo.heading.primary_key if name not in self.target.heading))
          except StopIteration:
              pass
          return (todo & AndList(restrictions)).proj()
docs: :return: the relation containing the keys to be computed (derived from self.key_source)