class_docstr: A descriptor to make special properties that become normal attributes.
  
  This is meant to be used mostly by the auto_attr decorator in this module.
docstr: Create a OneTimeProperty instance.
  
  Parameters
  ----------
    func : method
  
    The method that will be called the first time to compute a value.
    Afterwards, the method's name will be a standard attribute holding
    the value of this computation.
code: def __init__(self, func: ty.Callable[[InstanceT], T]) -> None:
      """Create a OneTimeProperty instance.
  
      Parameters
      ----------
        func : method
  
        The method that will be called the first time to compute a value.
        Afterwards, the method's name will be a standard attribute holding
        the value of this computation.
      """
      self.getter = func
      self.name = func.__name__
      self.__doc__ = func.__doc__
  
file_path: nibabel/nibabel/onetime.py
imports: from __future__ import annotations
  import typing
  from nibabel.deprecated import deprecate_with_version
label_desc: Use image node_id 1 to create a new OneTimeProperty object from inherited base classes: ty.Generic with example: obj = OneTimeProperty(func)