code: def _check_group_membership(group_membership: np.ndarray):
      """
      Checks if the group_membership matrix was correctly defined
  
      Parameters
      ----------
      group_membership: np.array
          Group membership matrix
      """
      if group_membership is None:
          raise ValueError(
              "Please define the 'group_membership' matrix"
          )
      if not isinstance(group_membership, np.ndarray):
          raise TypeError(
              "Argument 'group_membership' should be formatted \
                           as a numpy np.ndarray"
          )
  
imports: import numpy
  from typing import Dict
  import numpy.random
  import warnings
  from .local import LocalOptimisation
  from .brute import BruteForce
  from .strategy import SampleMorris
  from SALib.sample import common_args
  from SALib.util import scale_samples, read_param_file, compute_groups_matrix, _define_problem_with_groups, _compute_delta, _check_groups
label_desc: Use image node_id 9 for calling a global function with example usage: _check_group_membership(group_membership) without return types