code: def test_optional_args(self):
      MyArray, implements = _new_duck_type_and_implements()
  
      @array_function_dispatch(lambda array, option=None: (array,))
      def func_with_option(array, option="default"):
          return option
  
      @implements(func_with_option)
      def my_array_func_with_option(array, new_option="myarray"):
          return new_option
  
      # we don't need to implement every option on __array_function__
      # implementations
      assert_equal(func_with_option(1), "default")
      assert_equal(func_with_option(1, option="extra"), "extra")
      assert_equal(func_with_option(MyArray()), "myarray")
      with assert_raises(TypeError):
          func_with_option(MyArray(), option="extra")
  
      # but new options on implementations can't be used
      result = my_array_func_with_option(MyArray(), new_option="yes")
      assert_equal(result, "yes")
      with assert_raises(TypeError):
          func_with_option(MyArray(), new_option="no")
  
imports: import inspect
  import sys
  import os
  import tempfile
  from io import StringIO
  from unittest import mock
  import numpy
  from numpy.testing import assert_, assert_equal, assert_raises, assert_raises_regex
  from numpy.core.overrides import _get_implementing_args, array_function_dispatch, verify_matching_signatures
  from numpy.compat import pickle
  import pytest
label_desc: Use image node_id 2 for calling the TestArrayFunctionImplementation obj's underlying member method code with example usage: obj.test_optional_args() and returns: option, new_option