code: def distplot_1d(
      data,
      labels=None,
      xlabel=None,
      ylabel=None,
      title=None,
      figsize=None,
      colors=None,
      title_kwargs=None,
      hist_kwargs=None,
  ):
      """Plot distribution of 1D data.
  
      Args:
          data (array-like or list): Data to plot.
          labels (list, optional): List of labels for each data. Defaults to None.
          xlabel (str, optional): Label for x-axis. Defaults to None.
          ylabel (str, optional): Label for y-axis. Defaults to None.
          title (str, optional): Title of the plot. Defaults to None.
          figsize (tuple, optional): Figure size. Defaults to None.
          colors (str, optional): Color of the line. Defaults to None.
          title_kwargs (dict, optional): Keyword arguments for title. Defaults to None.
          hist_kwargs (dict, optional): Keyword arguments for histogram. Defaults to None.
  
      Returns:
          [matplotlib.figure.Figure]: Figure to plot.
      """
      hist_kwargs = _none2dict(hist_kwargs)
      title_kwargs = _none2dict(title_kwargs)
  
      fig = plt.figure(figsize=figsize)
      if colors is None:
          colors = plt.get_cmap("Set1").colors
  
      if not isinstance(data, list):
          data = [data]
  
      if labels is None:
          labels = np.range(len(data))
  
      for i in range(len(data)):
          sns.histplot(
              data[i], color=colors[i], label=labels[i], **hist_kwargs
          )
  
      if title is not None:
          plt.title(title, **title_kwargs)
      if xlabel is not None:
          plt.xlabel(xlabel)
      if ylabel is not None:
          plt.ylabel(ylabel)
      plt.legend()
  
      return fig
  
imports: import matplotlib.pyplot
  import numpy
  import seaborn
label_desc: Use image node_id 4 for calling a global function with example usage: distplot_1d(data, labels, xlabel, ylabel, title, figsize, colors, title_kwargs, hist_kwargs) and returns: fig