code: def collect_filtered(function, iterable, filtered):
      """
      Similar to :func:`filter` but collects filtered elements in ``filtered``.
  
      Args:
          function (callable): function that returns ``False`` for elements that
              should be filtered
          iterable (iterable): iterable to filter
          filtered (list): list to store filtered elements
      """
      for el in iterable:
          if function(el):
              yield el
          else:
              filtered.append(el)
  
imports: import contextlib
  import itertools
  import logging
  import re
  import warnings
  from typing import Optional, Tuple
  import math
  import numpy
  import torch
  from fairseq.file_io import PathManager
  from fairseq import utils
  import os
label_desc: Use image node_id 5 for calling a global function with example usage: collect_filtered(function, iterable, filtered) without return types