def get_cluster(options, env):
 cluster_option = options['cluster']
 if cluster_option:
  try:
   cluster = BenchmarkCluster.from_cluster_yaml(FilePath(cluster_option))
  except IOError as e:
   usage(options, 'Cluster file {!r} not found.'.format(e.filename))
 else:
  try:
   cluster = BenchmarkCluster.from_acceptance_test_env(env)
  except KeyError as e:
   usage(options, 'Environment variable {!r} not set.'.format(e.args[0]))
  except ValueError as e:
   usage(options, e.args[0])
  except ValidationError as e:
   usage(options, e.message)
 return cluster

def get_cluster ( options , env ) : cluster_option = options [ 'cluster' ] if cluster_option : try : cluster = BenchmarkCluster . from_cluster_yaml ( FilePath ( cluster_option ) ) except IOError as e : usage ( options , 'Cluster file {!r} not found.' . format ( e . filename ) ) else : try : cluster = BenchmarkCluster . from_acceptance_test_env ( env ) except KeyError as e : usage ( options , 'Environment variable {!r} not set.' . format ( e . args [ 0 ] ) ) except ValueError as e : usage ( options , e . args [ 0 ] ) except ValidationError as e : usage ( options , e . message ) return cluster
returns a cluster in a datacenter .