class_docstr: Abstract base class used for modules in a pipeline.
class_docstr_tok: ["Abstract","base","class","used","for","modules","in","a","pipeline","."]
docstr: Get object from datastore.
  
  Bit more advanced than dict.get()
  
  :param dict datastore: input datastore
  :param str feature: key of object to retrieve
  :param obj dtype: required datatype of object. Could be specific data type or tuple of dtypes
  :param obj default: object to default to in case key not found.
  :return: retrieved object
docstr_tok: ["Get","object","from","datastore",".","Bit","more","advanced","than","dict.get","(",")",":","param","dict","datastore",":","input","datastore",":","param","str","feature",":","key","of","object","to","retrieve",":","param","obj","dtype",":","required","datatype","of","object",".","Could","be","specific","data","type","or","tuple","of","dtypes",":","param","obj","default",":","object","to","default","to","in","case","key","not","found",".",":","return",":","retrieved","object"]
code: def get_datastore_object(datastore, feature, dtype, default=None):
      """Get object from datastore.
  
      Bit more advanced than dict.get()
  
      :param dict datastore: input datastore
      :param str feature: key of object to retrieve
      :param obj dtype: required datatype of object. Could be specific data type or tuple of dtypes
      :param obj default: object to default to in case key not found.
      :return: retrieved object
      """
      if default is not None:
          obj = datastore.get(feature, default)
      else:
          try:
              obj = datastore[feature]
          except KeyError as e:
              raise ValueError(
                  f"`{feature}` not found in the datastore!"
              ) from e
  
      if not isinstance(obj, dtype):
          raise TypeError(
              f"obj `{feature}` is not an instance of `{dtype}`!"
          )
      return obj
  
imports: from __future__ import annotations
  import logging
  from abc import ABCMeta
  from functools import wraps
label_desc: Use image node_id 7 for calling the Module obj's underlying member method code with example usage: obj.get_datastore_object(datastore, feature, dtype, default) and returns: obj