docs: def get_feature_names(clf, vec=None, bias_name='<BIAS>', feature_names=None,
                        num_features=None, estimator_feature_names=None):
      # type: (Any, Any, Optional[str], Any, int, Any) -> FeatureNames
      """
      Return a FeatureNames instance that holds all feature names
      and a bias feature.
      If vec is None or doesn't have get_feature_names() method,
      features are named x0, x1, x2, etc.
      """
      if not has_intercept(clf):
          bias_name = None
  
      if feature_names is None:
          if vec and hasattr(vec, 'get_feature_names'):
              return FeatureNames(vec.get_feature_names(), bias_name=bias_name)
          else:
              if estimator_feature_names is None:
                  num_features = num_features or get_num_features(clf)
                  return FeatureNames(
                      n_features=num_features,
                      unkn_template='x%d',
                      bias_name=bias_name
                  )
              return FeatureNames(estimator_feature_names, bias_name=bias_name)
  
      num_features = num_features or get_num_features(clf)
      if isinstance(feature_names, FeatureNames):
          if feature_names.n_features != num_features:
              raise ValueError("feature_names has a wrong n_features: "
                               "expected=%d, got=%d" % (num_features,
                                                        feature_names.n_features))
          # Make a shallow copy setting proper bias_name
          return FeatureNames(
              feature_names.feature_names,
              n_features=num_features,
              bias_name=bias_name,
              unkn_template=feature_names.unkn_template)
      else:
          if len(feature_names) != num_features:
              raise ValueError("feature_names has a wrong length: "
                               "expected=%d, got=%d" % (num_features,
                                                        len(feature_names)))
          return FeatureNames(feature_names, bias_name=bias_name)