class_docstr: Thread-safe kevent descriptor collection.
class_docstr_tok: ["Thread-safe","kevent","descriptor","collection","."]
docstr: Given a file descriptor, returns the kevent descriptor object
  for it.
  
  :param fd:
      OS file descriptor.
  :type fd:
      ``int``
  :returns:
      A :class:`KeventDescriptor` object.
docstr_tok: ["Given","a","file","descriptor",",","returns","the","kevent","descriptor","object","for","it",".",":","param","fd",":","OS","file","descriptor",".",":","type","fd",":","``","int","``",":","returns",":","A",":","class",":","`","KeventDescriptor","`","object","."]
code: def get_for_fd(self, fd):
      """
      Given a file descriptor, returns the kevent descriptor object
      for it.
  
      :param fd:
          OS file descriptor.
      :type fd:
          ``int``
      :returns:
          A :class:`KeventDescriptor` object.
      """
      with self._lock:
          return self._descriptor_for_fd[fd]
  
imports: from __future__ import with_statement
  from wandb_watchdog.utils import platform
  import threading
  import errno
  import sys
  import stat
  import os
  from wandb_watchdog.observers.api import BaseObserver, EventEmitter, DEFAULT_OBSERVER_TIMEOUT, DEFAULT_EMITTER_TIMEOUT
  from wandb_watchdog.utils.dirsnapshot import DirectorySnapshot
  from wandb_watchdog.events import DirMovedEvent, DirDeletedEvent, DirCreatedEvent, DirModifiedEvent, FileMovedEvent, FileDeletedEvent, FileCreatedEvent, FileModifiedEvent, EVENT_TYPE_MOVED, EVENT_TYPE_DELETED, EVENT_TYPE_CREATED
label_desc: Use image node_id 4 for calling the KeventDescriptorSet obj's underlying member method code with example usage: obj.get_for_fd(fd) and returns: self