def parse_strtime(dstr, fmt):
    try:
        return timeutils.parse_strtime(dstr, fmt)
    except (TypeError, __HOLE__) as e:
        raise exception.InvalidStrTime(reason=six.text_type(e))
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/compute/simple_tenant_usage.py/parse_strtime