code: def read_proc_file(path, opts):
      '''
      Return a dict of JID metadata, or None
      '''
      serial = salt.payload.Serial(opts)
      with salt.utils.files.fopen(path, 'rb') as fp_:
          try:
              data = serial.load(fp_)
          except Exception as err:
              # need to add serial exception here
              # Could not read proc file
              log.warning("Issue deserializing data: %s", err)
              return None
  
      if not isinstance(data, dict):
          # Invalid serial object
          log.warning("Data is not a dict: %s", data)
          return None
  
      pid = data.get('pid', None)
      if not pid:
          # No pid, not a salt proc file
          log.warning("No PID found in data")
          return None
  
      return datf read_proc_file(path, opts):
      '''
      Return a dict of JID metadata, or None
      '''
      serial = salt.payload.Serial(opts)
      with salt.utils.files.fopen(path, 'rb') as fp_:
          try:
              data = serial.load(fp_)
          except Exception as err:
              # need to add serial exception here
              # Could not read proc file
              log.warning("Issue deserializing data: %s", err)
              return None
  
      if not isinstance(data, dict):
          # Invalid serial object
          log.warning("Data is not a dict: %s", data)
          return None
  
      pid = data.get('pid', None)
      if not pid:
          # No pid, not a salt proc file
          log.warning("No PID found in data")
          return None
  
      return data
docs: Return a dict of JID metadata, or None