code: def test_serde_method():
      x = X()
  
      m = serde.decode(serde.encode(x.m))
  
      assert m() == 42
  
imports: from functools import partial
  from operator import add
  from pathlib import Path
  from typing import NamedTuple
  import numpy
  import pandas
  import pytest
  from gluonts.core.component import equals, equals_list
  from gluonts.core import serde
label_desc: Use image node_id 7 for calling a global function with example usage: test_serde_method() without return types