def get_metadata_value(body_response_server_details, metadata_key):
    """
    Retrieves the metadata value from instance details
    :param body_response_server_details: Parsed response (python dic). Server details data
    :param metadata_key: The key of the metadata to be retrieved
    :return: Metadata value with that key
    """
    metadata_value = None
    if metadata_key in body_response_server_details['server']['metadata']:
        metadata_value = body_response_server_details['server']['metadata'][metadata_key]

    return metadata_value