title: Is it possible to use custom or other libraries' decorators on a custom method of a pydantic model class
body: <p>I'm using Pydantic's <code>BaseModel</code> for creating my working class. I also have custom methods other than the methods with validators. I need to use <code>singledispatchmethod</code> decorator from functools with the custom function. For example,</p>
  <pre><code>class Foo(pydantic.BaseModel):
      name: str
      bar: int
      baz: int
  
      @functools.singledispatchmethod
      def handle(self, command: Command) -&gt; CommandResult:
          pass
  
      @celery.task
      def add(a: int, b: int):
          time.sleep(10)
          print(&quot;Sum is: &quot;, a+b)
  </code></pre>
  <p>However, it's throwing the following error for using the singledispatchmethod</p>
  <pre><code>File &quot;/models.py&quot;, line 56, in &lt;module&gt;
     class Foo(pydantic.BaseModel):
  File &quot;pydantic/main.py&quot;, line 323, in pydantic.main.ModelMetaclass.__new__
  File &quot;pydantic/fields.py&quot;, line 411, in pydantic.fields.ModelField.infer
  File &quot;pydantic/fields.py&quot;, line 342, in pydantic.fields.ModelField.__init__
  File &quot;pydantic/fields.py&quot;, line 456, in pydantic.fields.ModelField.prepare
  File &quot;pydantic/fields.py&quot;, line 670, in pydantic.fields.ModelField.populate_validators
  File &quot;pydantic/validators.py&quot;, line 715, in find_validators
  RuntimeError: no validator found for &lt;class 'functools.singledispatchmethod'&gt;, see `arbitrary_types_allowed` in Config
  </code></pre>
  <p>In the same fashion I also want to use Celery's task decorator on one such custom methods.</p>