def _find_manifestation_and_node(deployment, dataset_id):
 manifestations_and_nodes = manifestations_from_deployment(deployment, dataset_id)
 index = 0
 for (index, (manifestation, node)) in enumerate(manifestations_and_nodes):
  if manifestation.primary:
   (primary_manifestation, origin_node) = (manifestation, node)
   break
 else:
  if (index == 0):
   raise DATASET_NOT_FOUND
  else:
   raise IndexError('No primary manifestations for dataset: {!r}. See https://clusterhq.atlassian.net/browse/FLOC-1403'.format(dataset_id))
 return (primary_manifestation, origin_node)

def _find_manifestation_and_node ( deployment , dataset_id ) : manifestations_and_nodes = manifestations_from_deployment ( deployment , dataset_id ) index = 0 for ( index , ( manifestation , node ) ) in enumerate ( manifestations_and_nodes ) : if manifestation . primary : ( primary_manifestation , origin_node ) = ( manifestation , node ) break else : if ( index == 0 ) : raise DATASET_NOT_FOUND else : raise IndexError ( 'No primary manifestations for dataset: {!r}. See https://clusterhq.atlassian.net/browse/FLOC-1403' . format ( dataset_id ) ) return ( primary_manifestation , origin_node )
given the id of a dataset .