code: def losses() -> typing.Iterable[optim.losses.Loss]:
      for _, loss in inspect.getmembers(
          importlib.import_module("river.optim.losses"),
          lambda x: inspect.isclass(x)
          and not inspect.isabstract(x)
          and not issubclass(x, optim.losses.CrossEntropy),
      ):
          yield loss()
  
file_path: river/river/optim/test_.py
imports: from __future__ import annotations
  import importlib
  import inspect
  import math
  import random
  import typing
  import numpy
  import pytest
  from river import optim, utils
label_desc: Use image node_id 1 for calling a global function with example usage: losses() without return types