code: def __init__(
      self, fspath, parent=None, config=None, session=None, nodeid=None
  ):
      fspath = py.path.local(fspath)  # xxx only for test_resultlog.py?
      name = fspath.basename
      if parent is not None:
          rel = fspath.relto(parent.fspath)
          if rel:
              name = rel
          name = name.replace(os.sep, SEP)
      self.fspath = fspath
  
      session = session or parent.session
  
      if nodeid is None:
          nodeid = self.fspath.relto(session.config.rootdir)
  
          if not nodeid:
              nodeid = _check_initialpaths_for_relpath(session, fspath)
          if nodeid and os.sep != SEP:
              nodeid = nodeid.replace(os.sep, SEP)
  
      super(FSCollector, self).__init__(
          name, parent, config, session, nodeid=nodeid, fspath=fspath
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import warnings
  import py
  import six
  import _pytest._code
  from _pytest.compat import getfslineno
  from _pytest.mark.structures import NodeKeywords
  from _pytest.outcomes import fail
label_desc: Use image node_id 1 to create a new FSCollector object from inherited base classes: Collector with example: obj = FSCollector(fspath, parent, config, session, nodeid)