Getting parent enitity of enitityreference field Is there a function to get parent enityinfo to which entityreference field is attached. Similar function is hostEntity() provided by field_collection.

I created the content type which has enityform as enitityreference field.Enityform contains basic contact field with additional computed field.
In that field I need nid of node to which entityform is attached.Using entity_metadata_wrapper I am able to get info about entityform object using below code.

$wrapper = entity_metadata_wrapper($entity_type, $entity);  
$info=$wrapper-&gt;entityInfo();


Any idea how to further backtrack and get parent node id?

Update : Entityform is attached to a node(ref).
1.Node contains entity reference field, to which enitity form is attached.
2.Enityform contains computed field.
3.In computed field when the above mentioned code executed, field $wrapper gets the details about enitityform object(should be because computed field belongs to this entity).
4.As there will be no relation between node and the attached entityfrom after submission, I am trying to capture the NID of node during the form submission.
Something like this should work:

// Load wrapper
$wrapper = entity_metadata_wrapper($entity_type, $entity);  
// Load parent entity
$parent = $wrapper-&gt;field_entityreference-&gt;value();
// Get nid
$nid = $parent-&gt;field_computed_field-&gt;value();
// Debug output
drupal_set_message(t('Parent NID: @nid', array('@nid' =&gt; $nid)));