code: def format_filename(self, item: Union[Post, StoryItem], target: Optional[str] = None):
          
          return _PostPathFormatter(item).format(self.filename_pattern, target=target)
docs: Format filename of a :class:`Post` or :class:`StoryItem` according to ``filename-pattern`` parameter.
  
          .. versionadded:: 4.1