def METHOD_NAME(file: BinaryIO):
  """Generator function to read from a file BLOCK_SIZE bytes.
  Args:
    file: The file object to read from.
  Yields:
    Returns up to BLOCK_SIZE bytes from the file.
  """
  while True:
    data = file.read(BLOCK_SIZE)
    # If file was opened in rawIO, EOF is only reached when b'' is returned.
    # pylint: disable=g-explicit-bool-comparison
    if data == b'':
      break
    # pylint: enable=g-explicit-bool-comparison
    yield data