code: def report(
      vulnerabilities,
      fileobj,
      print_sanitised,
  ):
      
      n_vulnerabilities = len(vulnerabilities)
      unsanitised_vulnerabilities = [v for v in vulnerabilities if not isinstance(v, SanitisedVulnerability)]
      n_unsanitised = len(unsanitised_vulnerabilities)
      n_sanitised = n_vulnerabilities - n_unsanitised
      heading = "{} vulnerabilit{} found{}.\n".format(
          'No' if n_unsanitised == 0 else n_unsanitised,
          'y' if n_unsanitised == 1 else 'ies',
          " (plus {} sanitised)".format(n_sanitised) if n_sanitised else "",
      )
      vulnerabilities_to_print = vulnerabilities if print_sanitised else unsanitised_vulnerabilities
      with fileobj:
          for i, vulnerability in enumerate(vulnerabilities_to_print, start=1):
              fileobj.write(vulnerability_to_str(i, vulnerability))
  
          if n_unsanitised == 0:
              fileobj.write(color(heading, GOOD))
          else:
              fileobj.write(color(heading, DANGER))
docs: Prints issues in color-coded text format.
  
      Args:
          vulnerabilities: list of vulnerabilities to report
          fileobj: The output file object, which may be sys.stdout