docstr: Return an attribute from the Scale Space at a given level.
  
  Returns the level-th element of attribute if level is a valid level
  of this scale space. Otherwise, returns None.
  
  Parameters
  ----------
  attribute : list
      the attribute to retrieve the level-th element from
  level : int,
      the index of the required element from attribute.
  
  Returns
  -------
  attribute[level] : object
      the requested attribute if level is valid, else it raises
      a ValueError
docstr_tok: ["Return","an","attribute","from","the","Scale","Space","at","a","given","level",".","Returns","the","level-th","element","of","attribute","if","level","is","a","valid","level","of","this","scale","space",".","Otherwise",",","returns","None",".","Parameters","--","--","--","--","--","attribute",":","list","the","attribute","to","retrieve","the","level-th","element","from","level",":","int",",","the","index","of","the","required","element","from","attribute",".","Returns","--","--","--","-","attribute","[","level","]",":","object","the","requested","attribute","if","level","is","valid",",","else","it","raises","a","ValueError"]
code: def _get_attribute(self, attribute, level):
      """Return an attribute from the Scale Space at a given level.
  
      Returns the level-th element of attribute if level is a valid level
      of this scale space. Otherwise, returns None.
  
      Parameters
      ----------
      attribute : list
          the attribute to retrieve the level-th element from
      level : int,
          the index of the required element from attribute.
  
      Returns
      -------
      attribute[level] : object
          the requested attribute if level is valid, else it raises
          a ValueError
  
      """
      if 0 <= level < self.num_levels:
          return attribute[level]
      raise ValueError("Invalid pyramid level: " + str(level))
  
imports: import logging
  from dipy.align import floating
  import numpy
  import numpy.linalg
  from scipy.ndimage import gaussian_filter
label_desc: Use image node_id 4 for calling the ScaleSpace obj's underlying member method code with example usage: obj._get_attribute(attribute, level) and returns: attribute