code: def get_model_covariates(model: Model) -> np.ndarray:
      """
      Return covariates specified in the model.
      """
  
      terms = get_model_terms(model)
      covariates = []
      for term in terms.values():
          if hasattr(term, "components"):
              for component in term.components:
                  # if the component is a function call, use the argument names
                  if isinstance(component, Call):
                      covariates.append(
                          [arg.name for arg in component.call.args]
                      )
                  else:
                      covariates.append([component.name])
          elif hasattr(term, "factor"):
              covariates.append(list(term.var_names))
  
      flatten_covariates = [
          item for sublist in covariates for item in sublist
      ]
  
      return np.unique(flatten_covariates)
  
imports: from dataclasses import dataclass, field
  from typing import Union
  import numpy
  from formulae.terms.call import Call
  import pandas
  import xarray
  from bambi import Model
  from bambi.utils import listify
  from bambi.interpret.logs import log_interpret_defaults
label_desc: Use image node_id 3 for calling a global function with example usage: get_model_covariates(model) and returns: np