Given a result_object (returned by a previous API call), return
    the embedded object for link_relation.  The returned object can be
    treated as a result object in its own right.

    'result_object' a JSON object returned by a previous API call.
    The link relation of teh embedded object must have been specified
    when the result_object was originally requested. May not be None.
    'link_relation' the link relation for which href is required. May
    not be None.

    Returns None if the embedded object does not exist.

def get_embedded(result_object, link_relation):
    """
    Given a result_object (returned by a previous API call), return
    the embedded object for link_relation.  The returned object can be
    treated as a result object in its own right.

    'result_object' a JSON object returned by a previous API call.
    The link relation of teh embedded object must have been specified
    when the result_object was originally requested. May not be None.
    'link_relation' the link relation for which href is required. May
    not be None.

    Returns None if the embedded object does not exist.
    """

    # Argument error checking.
    assert result_object is not None
    assert link_relation is not None

    result = None

    embedded_object = result_object['_embedded']
    if embedded_object:
        result = embedded_object.get(link_relation)

    return result