def METHOD_NAME():
  try:
    connect_to_adminserver()
    edit()
    startEdit()
    cd('/Clusters/' + cluster_name + '/DynamicServers/' + cluster_name)
    cmo.setDynamicClusterSize(int(max_cluster_size))
    cmo.setMaxDynamicClusterSize(int(max_cluster_size))
    save()
    activate()
    disconnect()
  except NameError, e:
    print('Apparently properties not set.')
    print('Please check the property: ', sys.exc_info()[0], sys.exc_info()[1])    
    exit(exitcode=1)
  except:
    print 'Updating cluster size failed'
    print dumpStack()
    apply(traceback.print_exception, sys.exc_info())
    exit(exitcode=1)