code: def _define_seed(
      X: pd.DataFrame,
      index: int,
      seed_variables: Union[str, int, List[Union[str, int]]],
      how: str = "add",
  ) -> int:
      # determine seed by adding or multiplying the value of 1 or
      # more variables
      if how == "add":
          internal_seed = int(
              np.round(X.loc[index, seed_variables].sum(), 0)
          )
      elif how == "multiply":
          internal_seed = int(
              np.round(X.loc[index, seed_variables].product(), 0)
          )
      return internal_seed
  
file_path: feature_engine/feature_engine/imputation/random_sample.py
imports: from typing import List, Optional, Union
  import numpy
  import pandas
  from feature_engine._docstrings.fit_attributes import _feature_names_in_docstring, _n_features_in_docstring, _variables_attribute_docstring
  from feature_engine._docstrings.methods import _fit_transform_docstring
  from feature_engine._docstrings.substitute import Substitution
  from feature_engine._variable_handling.init_parameter_checks import _check_init_parameter_variables
  from feature_engine._variable_handling.variable_type_selection import _find_all_variables
  from feature_engine.dataframe_checks import check_X
  from feature_engine.imputation.base_imputer import BaseImputer
  from feature_engine.tags import _return_tags
label_desc: Use image node_id 1 for calling a global function with example usage: _define_seed(X, index, seed_variables, how) and returns: internal_seed