code: def get_widgets(self, position=None, include_draft=False):
          
  
          def widgets_generator(path):
              """Loads valid widgets one by one in the given path."""
              if os.path.isdir(path):
                  for file in os.listdir(path):
                      _, ext = os.path.splitext(file)
                      format_name = get_standard_format_name(ext[1:])
                      if format_name is not None:
                          # the format is supported, so load it
                          widget = Widget()
                          widget.format = format_name
                          widget.meta, widget.raw_content = \
                              FileStorage.read_file(os.path.join(path, file))
                          yield widget
  
          widgets_path = os.path.join(current_app.instance_path, 'widgets')
          positions = to_list(position) if position is not None else position
          result = filter(
              lambda w: (w.position in positions
                         if positions is not None else True) and
                        (include_draft or not w.is_draft),
              widgets_generator(widgets_path))
          return sorted(result, key=lambda w: (w.position, w.order))
docs: Get widgets for given position from filesystem.
  
          :param position: position or position list
          :param include_draft: return draft widgets or not
          :return: an iterable of Widget objects