/*
Create options suitable for a bucket-related RPC call by creating a deep copy
of the options passed in by the caller.  If the caller did not specify a
req_id, create one and add it to the returned options.
190683
function makeBucketOptions(options) {
    var opts = jsprim.deepCopy(options);
    opts.req_id = options.req_id || libuuid.create();
    return (opts);
}
746579
def _create(self, **kwargs):
        '''
        '''

        try:
            return super(Service, self)._create(**kwargs)
        except HTTPError as ex:
            if "The configuration was updated successfully but could not be " \
                    "retrieved" not in ex.response.text:
                raise

            # BIG-IP® will create in Common partition if none is given.
            # In order to create the uri properly in this class's load,
            # drop in Common as the partition in kwargs.
            if 'partition' not in kwargs:
                kwargs['partition'] = 'Common'
            # Pop all but the necessary load kwargs from the kwargs given to
            # create. Otherwise, load may fail.
            kwargs_copy = kwargs.copy()
            for key in kwargs_copy:
                if key not in self._meta_data['required_load_parameters']:
                    kwargs.pop(key)
            # If response was created successfully, do a local_update.
            # If not, call to overridden _load method via load
            return self.load(**kwargs)
634898
function createOptions( options ) {
	var object = optionsCache[ options ] = {};
	jQuery.each( options.split( core_rspace ), function( _, flag ) {
		object[ flag ] = true;
	});
	return object;
}
1081748
@Override
	@Transactional(enabled = false)
	public CPDefinitionOptionRel createCPDefinitionOptionRel(
		long CPDefinitionOptionRelId) {
		return cpDefinitionOptionRelPersistence.create(CPDefinitionOptionRelId);
	}
125365
private static Pubsub.Builder newPubsubClient(PubsubOptions options) {
    return new Pubsub.Builder(Transport.getTransport(), Transport.getJsonFactory(),
        chainHttpRequestInitializer(
            options.getGcpCredential(),
            // Do not log 404. It clutters the output and is possibly even required by the caller.
            new RetryHttpRequestInitializer(ImmutableList.of(404))))
        .setRootUrl(options.getPubsubRootUrl())
        .setApplicationName(options.getAppName())
        .setGoogleClientRequestInitializer(options.getGoogleApiTrace());
  }
388300
private static Options constructCliOptions() {
    Options options = new Options();

    Option packageUri = Option.builder("u")
        .desc("Uri indicating from where to download the file")
        .longOpt(CliArgs.TOPOLOGY_PACKAGE_URI.text)
        .hasArgs()
        .argName(CliArgs.TOPOLOGY_PACKAGE_URI.text)
        .build();

    Option destination = Option.builder("f")
        .desc("Destination to store the downloaded file")
        .longOpt(CliArgs.EXTRACT_DESTINATION.text)
        .hasArgs()
        .argName(CliArgs.EXTRACT_DESTINATION.text)
        .build();

    Option heronHome = Option.builder("d")
        .desc("Directory where heron is installed")
        .longOpt(CliArgs.HERON_HOME.text)
        .hasArgs()
        .argName("heron home dir")
        .build();

    Option configFile = Option.builder("p")
        .desc("Path of the config files")
        .longOpt(CliArgs.CONFIG_PATH.text)
        .hasArgs()
        .argName("config path")
        .build();

    // candidates:
    // local: download to client local machine
    // cluster: download into the container in the cloud
    Option mode = Option.builder("m")
        .desc("download mode, cluster or local")
        .longOpt(CliArgs.MODE.text)
        .hasArg()
        .argName("download mode")
        .build();

    options.addOption(packageUri);
    options.addOption(destination);
    options.addOption(heronHome);
    options.addOption(configFile);
    options.addOption(mode);

    return options;
  }
419271
function createRootSpan_(api, options, skipFrames) {
  options = options || {};
  // If the options object passed in has the getTraceContext field set,
  // try to retrieve the header field containing incoming trace metadata.
  var incomingTraceContext;
  if (is.string(options.traceContext)) {
    incomingTraceContext = api.agent_.parseContextFromHeader(options.traceContext);
  }
  incomingTraceContext = incomingTraceContext || {};
  if (!api.agent_.shouldTrace(options, incomingTraceContext.options)) {
    cls.setRootContext(nullSpan);
    return null;
  }
  var rootContext = api.agent_.createRootSpanData(options.name,
    incomingTraceContext.traceId,
    incomingTraceContext.spanId,
    skipFrames + 1);
  return new RootSpan(api.agent_, rootContext);
}
910576
def create_or_update(options) #:nodoc:
                                  #      puts 'create_or_update'
      ret = true
      run_callbacks :save do
        result = new_record? ? create(options) : update(options)
#        puts 'save_callbacks result=' + result.inspect
        ret = result
      end
      ret
    end
304391
function _createOptions(config) {
  return {
    filename:config.filename,
    displayErrors:true,
    timeout: config.timeout || 20*1000
  };
}
1244867
function createHandler(options) {
  /**
   * Client request handler
   * Data from the incoming request (plus options) is forwarded to the AWS module
   */
  return async (ctx) => {
    const { credentials, endpoint, region } = options
    const { rawBody: body, header: headers, method, url: path } = ctx.request

    console.log(chalk.cyan(method, path))

    const params = { body, credentials, endpoint, headers, method, path, region }
    const req = createSignedAWSRequest(params)
    const res = await sendAWSRequest(req)

    ctx.status = 200
    ctx.type = 'application/json'
    ctx.response.header = stripProxyResHeaders(res)
    ctx.body = res.body
  }
}
648735
function create(options) {
  return knex(extend({
    client: "pg",
    debug: debug(),
    connection: connection(),
    pool: pool()
  }, options));
}
409627
public static CreateObjectOptions objectOptionsFromFileOptions(CreateFileOptions options) {
    return new CreateObjectOptions(
        options.overwriteExisting(), options.getContentType(), options.getAttributes());
  }
810362
function (source, opts, cb) {
        var callback,
            options;

        if (arguments.length === 2) {
            options = defaults();
            callback = opts;
        } else {
            options = defaults(opts);
            callback = cb;
        }

        try {
            source = api.clean(source);
            callback(null, api.insert(source, getToc(source, options)));
        } catch (err) {
            callback(err, null);
        }
    }
1108404
public static function create()
	{
		switch (func_num_args()) {
			case 0:
				return new MethodOptions();
			case 1:
				return new MethodOptions(func_get_arg(0));
			case 2:
				return new MethodOptions(func_get_arg(0), func_get_arg(1));
			case 3:
				return new MethodOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2));
			case 4:
				return new MethodOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3));
			case 5:
				return new MethodOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4));
			case 6:
				return new MethodOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4), func_get_arg(5));
			case 7:
				return new MethodOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4), func_get_arg(5), func_get_arg(6));
			case 8:
				return new MethodOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4), func_get_arg(5), func_get_arg(6), func_get_arg(7));
			default:
				throw new \InvalidArgumentException('More than 8 arguments supplied, please be reasonable.');
		}
	}
530176
public static function create()
	{
		switch (func_num_args()) {
			case 0:
				return new ServiceOptions();
			case 1:
				return new ServiceOptions(func_get_arg(0));
			case 2:
				return new ServiceOptions(func_get_arg(0), func_get_arg(1));
			case 3:
				return new ServiceOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2));
			case 4:
				return new ServiceOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3));
			case 5:
				return new ServiceOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4));
			case 6:
				return new ServiceOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4), func_get_arg(5));
			case 7:
				return new ServiceOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4), func_get_arg(5), func_get_arg(6));
			case 8:
				return new ServiceOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4), func_get_arg(5), func_get_arg(6), func_get_arg(7));
			default:
				throw new \InvalidArgumentException('More than 8 arguments supplied, please be reasonable.');
		}
	}
827388
function createOptionsForServerSpec(serverSpec) {
    var options = {
        forceNew: true,            // Make a new connection each time
        reconnection: false        // Don't try and reconnect automatically
    };

    // If the server spec contains a socketResource setting we use
    // that otherwise leave the default ('/socket.io/')
    if(serverSpec.socket.socketResource) {
        options.resource = serverSpec.socket.socketResource;
    }
    return options;
}
169784
@Override
	public Context create(String name, Tree params, CallOptions.Options opts, PacketStream stream, Context parent) {

		// Generate ID
		String id = uid.nextUID();

		// Create new Context
		if (parent == null) {
			return new Context(serviceInvoker, eventbus, id, name, params, opts, stream);
		}

		// Merge meta block
		if (parent.params != null) {
			Tree parentMeta = parent.params.getMeta(false);
			if (parentMeta != null && !parentMeta.isEmpty()) {
				Tree currentMeta = params.getMeta(true);
				if (currentMeta.isEmpty()) {
					currentMeta.setObject(parentMeta.asObject());
				} else {
					currentMeta.copyFrom(parentMeta, false);
				}
			}
		}

		// Verify call level
		if (maxCallLevel > 0 && parent.level >= maxCallLevel) {
			throw new MaxCallLevelError(broker.getNodeID(), maxCallLevel);
		}

		// Create context (nested call)
		return new Context(id, name, params, opts, stream, parent);
	}