code: def buffered_read(input, buffer_size):
      buffer = []
      with fileinput.input(
          files=[input], openhook=fileinput.hook_encoded("utf-8")
      ) as h:
          for src_str in h:
              buffer.append(src_str.strip())
              if len(buffer) >= buffer_size:
                  yield buffer
                  buffer = []
  
      if len(buffer) > 0:
          yield buffer
  
file_path: fairseq/fairseq_cli/interactive.py
imports: import ast
  import fileinput
  import logging
  import math
  import os
  import sys
  import time
  from argparse import Namespace
  from collections import namedtuple
  import numpy
  import torch
  from fairseq import checkpoint_utils, distributed_utils, options, tasks, utils
  from fairseq.dataclass.configs import FairseqConfig
  from fairseq.dataclass.utils import convert_namespace_to_omegaconf
  from fairseq.token_generation_constraints import pack_constraints, unpack_constraints
  from fairseq_cli.generate import get_symbols_to_strip_from_output
label_desc: Use image node_id 1 for calling a global function with example usage: buffered_read(input, buffer_size) without return types