original_docstring: Return how many values the caller is expecting.
      `nargout_default` is the value returned if no return value is expected.
      By default this is 1.
      
docstring: Return how many values the caller is expecting.
  `nargout_default` is the value returned if no return value is expected.
  By default this is 1.
docstring_tokens: Return how many values the caller is expecting . ` nargout_default ` is the value returned if no return value is expected . By default this is 1 .
code: def _get_narginout(nargout_default=1):
      """Return how many values the caller is expecting.
      `nargout_default` is the value returned if no return value is expected.
      By default this is 1.
      """
      import sys, dis
      f = sys._getframe()
      # step into the function that called us
      fb = f.f_back
      innames = fb.f_code.co_varnames[:fb.f_code.co_argcount]
      nargin = len([ x for x in innames if fb.f_locals.get(x, None) is not None ])
      vargin = fb.f_locals.get('varargin', None)
      if vargin is not None:
          nargin += len(vargin)
      # nargout is one frame back
      f = f.f_back.f_back
      c = f.f_code
      i = f.f_lasti
      bytecode = c.co_code
      instruction = ord(bytecode[i+3])
      if instruction == dis.opmap['UNPACK_SEQUENCE']:
          howmany = ord(bytecode[i+4])
          return nargin, howmany
      elif instruction == dis.opmap['POP_TOP']:
          # MATLAB assumes at least 1 value
          return nargin, nargout_default
      return nargin, 1
code_tokens: def _get_narginout ( nargout_default = 1 ) : import sys , dis f = sys . _getframe ( ) fb = f . f_back innames = fb . f_code . co_varnames [ : fb . f_code . co_argcount ] nargin = len ( [ x for x in innames if fb . f_locals . get ( x , None ) is not None ] ) vargin = fb . f_locals . get ( 'varargin' , None ) if vargin is not None : nargin += len ( vargin ) f = f . f_back . f_back c = f . f_code i = f . f_lasti bytecode = c . co_code instruction = ord ( bytecode [ i + 3 ] ) if instruction == dis . opmap [ 'UNPACK_SEQUENCE' ] : howmany = ord ( bytecode [ i + 4 ] ) return nargin , howmany elif instruction == dis . opmap [ 'POP_TOP' ] : return nargin , nargout_default return nargin , 1
short_docstring: Return how many values the caller is expecting.
short_docstring_tokens: Return how many values the caller is expecting .
comment: """Return how many values the caller is expecting.
      `nargout_default` is the value returned if no return value is expected.
      By default this is 1.
      """$SEP$# step into the function that called us
  $SEP$# nargout is one frame back
  $SEP$# MATLAB assumes at least 1 value
  