"""
  This script may contains specific prototyping code for 
  get master done for resilience.
"""

title = context.getTitle()

if not (title.startswith("kvm") or title.startswith("runner")):
  # This instance is not a clone from resilience
  return None 

instance_tree = context.getSpecialiseValue()

for instance in instance_tree.getSpecialiseRelatedValueList(
   portal_type="Software Instance"):
  if instance.getTitle() in ["kvm0", "runner0"]:
    return instance

return None
