docs: def check_resource(resource):
      '''
      Check a resource availability against a linkchecker backend
  
      The linkchecker used can be configured on a resource basis by setting
      the `resource.extras['check:checker']` attribute with a key that points
      to a valid `udata.linkcheckers` entrypoint. If not set, it will
      fallback on the default linkchecker defined by the configuration variable
      `LINKCHECKING_DEFAULT_LINKCHECKER`.
  
      Returns
      -------
      dict or (dict, int)
          Check results dict and status code (if error).
      '''
      linkchecker_type = resource.extras.get('check:checker')
      LinkChecker = get_linkchecker(linkchecker_type)
      if not LinkChecker:
          return {'error': 'No linkchecker configured.'}, 503
      if is_ignored(resource):
          return dummy_check_response()
      result = LinkChecker().check(resource)
      if not result:
          return {'error': 'No response from linkchecker'}, 503
      elif result.get('check:error'):
          return {'error': result['check:error']}, 500
      elif not result.get('check:status'):
          return {'error': 'No status in response from linkchecker'}, 503
      # store the check result in the resource's extras
      # XXX maybe this logic should be in the `Resource` model?
      previous_status = resource.extras.get('check:available')
      check_keys = _get_check_keys(result, resource, previous_status)
      resource.extras.update(check_keys)
      resource.save(signal_kwargs={'ignores': ['post_save']})  # Prevent signal triggering on dataset
      return result