def get_default_value(argument_index, argspec):
    """Returns the default value that is specified in the given `argspec` for the argument at the given
    `argument_ index`. There is no distinction between defaulting to None and no default specified. In both of these
    cases `None` is returned."""

    if not argspec.defaults:
        return None

    defaultslen = len(argspec.defaults)
    argslen = len(argspec.args)
    no_defaults = argslen - defaultslen
    default_index = argument_index - no_defaults

    if default_index < 0:
        return None

    return argspec.defaults[default_index]