code: def options(self, session=None):
          
          dbo = self.__database.client.get_database(
              self.__database.name,
              self.codec_options,
              self.read_preference,
              self.write_concern,
              self.read_concern)
          cursor = dbo.list_collections(
              session=session, filter={"name": self.__name})
  
          result = None
          for doc in cursor:
              result = doc
              break
  
          if not result:
              return {}
  
          options = result.get("options", {})
          if "create" in options:
              del options["create"]
  
          return options
docs: Get the options set on this collection.
  
          Returns a dictionary of options and their values - see
          :meth:`~pymongo.database.Database.create_collection` for more
          information on the possible options. Returns an empty
          dictionary if the collection has not been created yet.
  
          :Parameters:
            - `session` (optional): a
              :class:`~pymongo.client_session.ClientSession`.
  
          .. versionchanged:: 3.6
             Added ``session`` parameter.