def METHOD_NAME(netbox, time_frame):
    """Get availability for a given netbox and time frame
    :type netbox: nav.models.manage.Netbox
    :type time_frame: basestring
    """
    availability = netbox.get_availability()
    try:
        return "%.2f%%" % availability["availability"][time_frame]
    except (KeyError, TypeError):
        return "N/A"