code: def tabular_learner(
      dls: TabularDataLoaders,
      layers: list = None,  # Size of the layers generated by `LinBnDrop`
      emb_szs: list = None,  # Tuples of `n_unique, embedding_size` for all categorical features
      config: dict = None,  # Config params for TabularModel from `tabular_config`
      n_out: int = None,  # Final output size of the model
      y_range: Tuple = None,  # Low and high for the final sigmoid function
      **kwargs,
  ):
      "Get a `Learner` using `dls`, with `metrics`, including a `TabularModel` created using the remaining params."
      if config is None:
          config = tabular_config()
      if layers is None:
          layers = [200, 100]
      to = dls.train_ds
      emb_szs = get_emb_sz(
          dls.train_ds, {} if emb_szs is None else emb_szs
      )
      if n_out is None:
          n_out = get_c(dls)
      assert (
          n_out
      ), "`n_out` is not defined, and could not be inferred from data, set `dls.c` or pass `n_out`"
      if y_range is None and "y_range" in config:
          y_range = config.pop("y_range")
      model = TabularModel(
          emb_szs,
          len(dls.cont_names),
          n_out,
          layers,
          y_range=y_range,
          **config,
      )
      return TabularLearner(dls, model, **kwargs)
  
file_path: fastai/fastai/tabular/learner.py
imports: from __future__ import annotations
  from ..basics import *
  from .core import *
  from .model import *
  from .data import *
label_desc: Use image node_id 1 for calling a global function with example usage: tabular_learner(dls, layers, emb_szs, config, n_out, y_range) and returns: TabularLearner