def METHOD_NAME(self, key: str, default: Any = None, unit: Any = None, **kwargs):
    '''
    Returns the parsed result for quantity with name key. If quantity is not in
    results default will be returned. A pint unit can be provided which is attached
    to the returned value.
    '''
    if self.mainfile is None:
        return default
    self._key = key
    self._kwargs = kwargs
    val = self.results.METHOD_NAME(key, None)
    if val is None:
        val = default
    if val is None:
        return
    if unit is not None:
        if isinstance(unit, pint.Quantity) or isinstance(unit, pint.Unit):
            val = val * unit
        elif isinstance(val, pint.Quantity):
            val = val.to(unit)
        else:
            val = pint.Quantity(val, unit)
    return val