code: def _get_meta(obj):
          
          if hasattr(obj, 'meta'):  # Spectrum or model
              meta = deepcopy(obj.meta)
          elif isinstance(obj, dict):  # Metadata
              meta = deepcopy(obj)
          else:  # Number
              meta = {}
          return meta
docs: Extract metadata, if any, from given object.