docstr: Return either a scalar s or a tuple depending on
  whether axis or axes is specified
docstr_tok: ["Return","either","a","scalar","s","or","a","tuple","depending","on","whether","axis","or","axes","is","specified"]
code: def s_from_kwargs(self, test_shape, kwargs):
      """Return either a scalar s or a tuple depending on
      whether axis or axes is specified
      """
      default_args = get_default_args(
          getattr(self.test_interface, self.func)
      )
  
      if "axis" in kwargs:
          s = test_shape[kwargs["axis"]]
  
      elif "axes" in kwargs:
          axes = kwargs["axes"]
          if axes is not None:
              s = []
              for each_axis in axes:
                  s.append(test_shape[each_axis])
          else:
              # default nD
              s = []
              try:
                  for each_axis in default_args["axes"]:
                      s.append(test_shape[each_axis])
              except TypeError:
                  try:
                      s = list(
                          test_shape[self.default_s_from_shape_slicer]
                      )
                  except TypeError:
                      # We had an integer as the default, so force
                      # it to be a list
                      s = [test_shape[self.default_s_from_shape_slicer]]
  
      else:
          if "axis" in default_args:
              # default 1D
              s = test_shape[default_args["axis"]]
          else:
              # default nD
              s = []
              try:
                  for each_axis in default_args["axes"]:
                      s.append(test_shape[each_axis])
              except TypeError:
                  s = None
  
      return s
  
imports: from pyfftw import interfaces, _supported_types, _all_types_np
  from .test_pyfftw_base import run_test_suites, np_fft
  from ._get_default_args import get_default_args
  from packaging.version import Version
  import unittest
  import numpy
  import warnings
  import copy
label_desc: Use image node_id 7 for calling the InterfacesNumpyFFTTestFFT obj's underlying member method code with example usage: obj.s_from_kwargs(test_shape, kwargs) and returns: s