code: def test_takes_arg(self):
      def bare_function(some_input: int) -> int:
          return some_input + 1
  
      assert takes_arg(bare_function, "some_input")
      assert not takes_arg(bare_function, "some_other_input")
  
      class SomeClass:
          total = 0
  
          def __init__(self, constructor_param: str) -> None:
              self.constructor_param = constructor_param
  
          def check_param(self, check: str) -> bool:
              return self.constructor_param == check
  
          @classmethod
          def set_total(cls, new_total: int) -> None:
              cls.total = new_total
  
      assert takes_arg(SomeClass, "self")
      assert takes_arg(SomeClass, "constructor_param")
      assert not takes_arg(SomeClass, "check")
  
      assert takes_arg(SomeClass.check_param, "check")
      assert not takes_arg(SomeClass.check_param, "other_check")
  
      assert takes_arg(SomeClass.set_total, "new_total")
      assert not takes_arg(SomeClass.set_total, "total")
  
imports: from typing import Dict, Iterable, List, Mapping, Optional, Set, Tuple, Union
  import pytest
  import torch
  from allennlp.common import Lazy, Params, Registrable
  from allennlp.common.from_params import FromParams, takes_arg, remove_optional, create_kwargs
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data import DataLoader, DatasetReader, Tokenizer
  from allennlp.models import Model
  from allennlp.models.archival import load_archive
  from allennlp.common.checks import ConfigurationError
label_desc: Use image node_id 1 for calling the TestFromParams obj's underlying member method code with example usage: obj.test_takes_arg() and returns: unknown, unknown