code: def _get_pwned(prefix):
      
      try:
          response = requests.get(
              url=API_ENDPOINT.format(prefix),
              headers={'User-Agent': USER_AGENT},
              timeout=getattr(
                  settings,
                  'PWNED_PASSWORDS_API_TIMEOUT',
                  REQUEST_TIMEOUT,
              ),
          )
          response.raise_for_status()
      except requests.RequestException as e:
          # Gracefully handle timeouts and HTTP error response codes.
          log.warning(
              'Skipped Pwned Passwords check due to error: %r', e
          )
          return None
  
      results = {}
      for line in response.text.splitlines():
          line_suffix, _, times = line.partition(':')
          results[line_suffix] = int(times)
  
      return results
docs: Fetches a dict of all hash suffixes from Pwned Passwords for a
      given SHA-1 prefix.