class_docstr: See :mod:`imageio.plugins.dicom`
class_docstr_tok: ["See",":","mod",":","`","imageio.plugins.dicom","`"]
code: def _can_read(self, request):
      # If user URI was a directory, we check whether it has a DICOM file
      if os.path.isdir(request.filename):
          files = os.listdir(request.filename)
          for fname in sorted(files):  # Sorting make it consistent
              filename = os.path.join(request.filename, fname)
              if os.path.isfile(filename) and "DICOMDIR" not in fname:
                  with open(filename, "rb") as f:
                      first_bytes = read_n_bytes(f, 140)
                  return first_bytes[128:132] == b"DICM"
          else:
              return False
      # Check
      return request.firstbytes[128:132] == b"DICM"
  
file_path: imageio/imageio/plugins/dicom.py
imports: import os
  import sys
  import logging
  import subprocess
  from ..core import Format, BaseProgressIndicator, StdoutProgressIndicator
  from ..core import read_n_bytes
label_desc: Use image node_id 1 for calling the DicomFormat obj's underlying member method code with example usage: obj._can_read(request) and returns: unknown, False, unknown