parameters: (list_of_columns: list, sep: str)
return_statement: return result
docstring: Auxiliary function for :meth:`str.cat`.
  
      Same signature as cat_core, but handles TypeErrors in concatenation, which
      happen if the arrays in list_of columns have the wrong dtypes or content.
  
      Parameters
      ----------
      list_of_columns : list of numpy arrays
          List of arrays to be concatenated with sep;
          these arrays may not contain NaNs!
      sep : string
          The separator string for concatenating the columns.
  
      Returns
      -------
      nd.array
          The concatenation of list_of_columns with sep.
docstring_summary: Auxiliary function for :meth:`str.cat`.
docstring_tokens: Auxiliary function for : meth : str . cat .
function: def cat_safe(list_of_columns: list, sep: str):
      """
      Auxiliary function for :meth:`str.cat`.
  
      Same signature as cat_core, but handles TypeErrors in concatenation, which
      happen if the arrays in list_of columns have the wrong dtypes or content.
  
      Parameters
      ----------
      list_of_columns : list of numpy arrays
          List of arrays to be concatenated with sep;
          these arrays may not contain NaNs!
      sep : string
          The separator string for concatenating the columns.
  
      Returns
      -------
      nd.array
          The concatenation of list_of_columns with sep.
      """
      try:
          result = cat_core(list_of_columns, sep)
      except TypeError:
          # if there are any non-string values (wrong dtype or hidden behind
          # object dtype), np.sum will fail; catch and return with better message
          for column in list_of_columns:
              dtype = lib.infer_dtype(column, skipna=True)
              if dtype not in ["string", "empty"]:
                  raise TypeError(
                      "Concatenation requires list-likes containing only "
                      "strings (or missing values). Offending values found in "
                      f"column {dtype}"
                  ) from None
      return result
function_tokens: def cat_safe ( list_of_columns : list , sep : str ) : try : result = cat_core ( list_of_columns , sep ) except TypeError : # if there are any non-string values (wrong dtype or hidden behind # object dtype), np.sum will fail; catch and return with better message for column in list_of_columns : dtype = lib . infer_dtype ( column , skipna = True ) if dtype not in [ "string" , "empty" ] : raise TypeError ( "Concatenation requires list-likes containing only " "strings (or missing values). Offending values found in " f"column {dtype}" ) from None return result