def key_value_string_value(key_value_string, key):
    """Extract value for key from Zotero key-value-string.

    Zotero 'Extra'' field stores data as a space separated string:
    'key1: value1 key2: value2 key3: value3'.
    This function extracts a value for a key from such a string. 
    """
    if key_value_string is None or key is None:
        return None
    words = key_value_string.split(' ')
    for i in range(0, len(words)-1):
        if words[i] == key + ':':
            return words[i+1]
    return None