class_docstr: Normal faker object can get slow when sampling large datasets, e.g. for Mocks. This one is cached
  And therefore faster
code: def __getattr__(self, name: str) -> Any:
      if len(self.cache.get(name, [])) > 100:
          return lambda: secrets.choice(self.cache[name])
      else:
  
          def wrapper(*args: Any, **kwargs: Any) -> Any:
              method = getattr(self.fake, name)
              res = method(*args, **kwargs)
              self.cache[name].append(res)
              return res
  
          return wrapper
  
file_path: PySyft/packages/syft/src/syft/serde/mock.py
imports: from collections import defaultdict
  import secrets
  from typing import Any
  from typing import Dict
  from typing import List
  from faker import Faker
label_desc: Use image node_id 2 for calling the CachedFaker obj's underlying member method code with example usage: obj.__getattr__(name) and returns: function, wrapper, res