code: def _data_checks_complete(
      df: pd.DataFrame,
      columns: List[Union[List, Tuple, Dict, str]],
      sort: Optional[bool],
      by: Optional[Union[list, str]],
      fill_value: Optional[Union[Dict, Any]],
      explicit: bool,
  ):
      """
      Function to check parameters in the `complete` function.
      Checks the type of the `columns` parameter, as well as the
      types within the `columns` parameter.
  
      Check is conducted to ensure that column names are not repeated.
      Also checks that the names in `columns` actually exist in `df`.
  
      Returns `df`, `columns`, `column_checker`, `by`, `fill_value`,
      and `explicit` if all checks pass.
      """
  
      if by:
          if not isinstance(by, list):
              by = [by]
          check_column(df, column_names=by, present=True)
  
      columns = [
          [*grouping] if isinstance(grouping, tuple) else grouping
          for grouping in columns
      ]
      column_checker = []
      for grouping in columns:
          if is_scalar(grouping):
              column_checker.append(grouping)
          else:
              check("grouping", grouping, [list, dict])
              if not grouping:
                  raise ValueError(
                      "entry in columns argument cannot be empty"
                  )
              column_checker.extend(grouping)
  
      # columns should not be duplicated across groups
      # nor should it exist in `by`
      column_checker_no_duplicates = set()
      for column in column_checker:
          if column is None:
              raise ValueError(
                  "label in the columns argument cannot be None."
              )
          if column in column_checker_no_duplicates:
              raise ValueError(f"{column} should be in only one group.")
          if by and (column in by):
              raise ValueError(
                  f"{column} already exists as a label in the `by` argument."
              )
          column_checker_no_duplicates.add(column)  # noqa: PD005
  
      check_column(df, column_names=column_checker, present=True)
  
      check("explicit", explicit, [bool])
  
      column_checker_no_duplicates = None
  
      check("sort", sort, [bool])
  
      fill_value_check = is_scalar(fill_value), isinstance(
          fill_value, dict
      )
      if not any(fill_value_check):
          raise TypeError(
              "fill_value should either be a dictionary or a scalar value."
          )
      if fill_value_check[-1]:
          check_column(df, fill_value)
          for column_name, value in fill_value.items():
              if not is_scalar(value):
                  raise ValueError(
                      f"The value for {column_name} should be a scalar."
                  )
  
      return columns, column_checker, sort, by, fill_value, explicit
  
file_path: pyjanitor/janitor/functions/complete.py
imports: import functools
  from typing import Any, Dict, List, Optional, Tuple, Union
  import pandas
  import pandas_flavor
  from pandas.api.types import is_list_like, is_scalar
  from pandas.core.common import apply_if_callable
  from janitor.functions.utils import _computations_expand_grid
  from janitor.utils import check, check_column
label_desc: Use image node_id 7 for calling a global function with example usage: _data_checks_complete(df, columns, sort, by, fill_value, explicit) and returns: columns,  column_checker,  sort,  by,  fill_value,  explicit