Deepcopy the parameter (with a new uniqueid).  All other tags will remain
        the same... so some other tag should be changed before attaching back to
        a ParameterSet or Bundle.

        :return: the copied :class:`Parameter` object
184551
def copy(self):
        
        s = self.to_json()
        cpy = parameter_from_json(s)
        # TODO: may need to subclass for Parameters that require bundle by using this line instead:
        # cpy = parameter_from_json(s, bundle=self._bundle)
        cpy.set_uniqueid(_uniqueid())
        return cpy
599578
def add_parameter(self, parameter: Parameter):
        

        # try reading the scenarios from the function arg or from the parameter attribute
        scenario_string = parameter.source_scenarios_string
        if scenario_string:
            _scenarios = [i.strip() for i in scenario_string.split(',')]
            self.fill_missing_attributes_from_default_parameter(parameter)

        else:
            _scenarios = [ParameterScenarioSet.default_scenario]

        for scenario in _scenarios:
            parameter.scenario = scenario
            self.parameter_sets[parameter.name][scenario] = parameter

        # record all tags for this parameter
        if parameter.tags:
            _tags = [i.strip() for i in parameter.tags.split(',')]
            for tag in _tags:
                self.tags[tag][parameter.name].add(parameter)
25687
def copyidfobject(self, idfobject):
        
        return addthisbunch(self.idfobjects,
                     self.model,
                     self.idd_info,
                     idfobject, self)
612856
def copy(self,deep=yes):
        
        if deep:
            return copy.deepcopy(self)
        else:
            return copy.copy(self)
456567
def copy(self, new_grab=None):
        

        obj = self.__class__()
        obj.process_grab(new_grab if new_grab else self.grab)

        copy_keys = ('status', 'code', 'head', 'body', 'total_time',
                     'connect_time', 'name_lookup_time',
                     'url', 'charset', '_unicode_body',
                     '_grab_config')
        for key in copy_keys:
            setattr(obj, key, getattr(self, key))

        obj.headers = copy(self.headers)
        # TODO: Maybe, deepcopy?
        obj.cookies = copy(self.cookies)

        return obj
959819
def uuid(self):
        '''
        '''
        pk = self.pkvalue()
        if not pk:
            raise self.DoesNotExist(
                'Object not saved. Cannot obtain universally unique id')
        return self.get_uuid(pk)
1264989
def copy(self):
        
        return self.__class__(options=self.__options,
                              attribute_options=self.__attribute_options)
774225
def put(self, method, params):
        
        # Prepare the params, first by adding a custom command to
        # simulate a PUT request even though we are actually POSTing.
        # This is something DocumentCloud expects.
        params['_method'] = 'put'
        # Some special case handling of the document_ids list, if it exists
        if params.get("document_ids", None):
            # Pull the document_ids out of the params
            document_ids = params.get("document_ids")
            del params['document_ids']
            params = urllib.parse.urlencode(params, doseq=True)
            # These need to be specially formatted in the style documentcloud
            # expects arrays. The example they provide is:
            # ?document_ids[]=28-boumediene&document_ids[]=\
            # 207-academy&document_ids[]=30-insider-trading
            params += "".join([
                '&document_ids[]=%s' % id for id in document_ids
            ])
        # More special case handler of key/value data tags, if they exist
        elif params.get("data", None):
            # Pull them out of the dict
            data = params.get("data")
            del params['data']
            params = urllib.parse.urlencode(params, doseq=True)
            # Format them in the style documentcloud expects
            # ?data['foo']=bar&data['tit']=tat
            params += "".join([
                '&data[%s]=%s' % (
                    urllib.parse.quote_plus(key.encode("utf-8")),
                    urllib.parse.quote_plus(value.encode("utf-8"))
                ) for key, value in
                data.items()
            ])
        else:
            # Otherwise, we can just use the vanilla urllib prep method
            params = urllib.parse.urlencode(params, doseq=True)

        # Make the request
        self._make_request(
            self.BASE_URI + method,
            params.encode("utf-8"),
        )
1345557
def __non_body_parameter_descriptor(self, param):
    
    descriptor = {}

    descriptor['name'] = param.name

    param_type, param_format = self.__field_to_parameter_type_and_format(param)

    # Required
    if param.required:
      descriptor['required'] = True

    # Type
    descriptor['type'] = param_type

    # Format (optional)
    if param_format:
      descriptor['format'] = param_format

    # Default
    default = self.__parameter_default(param)
    if default is not None:
      descriptor['default'] = default

    # Repeated
    if param.repeated:
      descriptor['repeated'] = True

    # Enum
    enum_descriptor = self.__parameter_enum(param)
    if enum_descriptor is not None:
      descriptor['enum'] = enum_descriptor

    return descriptor
423898
def _remap_tag_to_tag_id(cls, tag, new_data):
        ''''''
        try:
            value = new_data[tag]
        except:
            # If tag wasn't changed, just return
            return

        tag_id = tag + '_id'
        try:
            # Remap the ID change to the required field
            new_data[tag_id] = value['id']
        except:
            try:
                # Try and grab the id of the object
                new_data[tag_id] = value.id
            except AttributeError:
                # If the changes field is not a dict or object, just use whatever value was given
                new_data[tag_id] = value

        # Remove the tag from the changed data
        del new_data[tag]
446611
def _copy(query_dict):
    

    memo = { }

    result = query_dict.__class__('',
        encoding=query_dict.encoding,
        mutable=True)

    memo[id(query_dict)] = result

    for key, value in dict.items(query_dict):
        dict.__setitem__(result,
            copy.deepcopy(key, memo),
            copy.deepcopy(value, memo))

    return result
651696
def get_unique_parameters(self):
        '''
        
        '''
        # start with parameters in the `_parameters` dictionary
        parameters = self._parameters.values()
        # add parameters defined with the class
        for name in dir(self):
            item = getattr(self, name)
            if isinstance(item, Parameter):
                if item.name not in self._parameters:
                    parameters.append(item)
        return parameters
117092
def clone(self) -> "Event":
        
        return self.__class__(copy.deepcopy(self.event), copy.deepcopy(self.metadata))
691322
public TagLib duplicate(boolean deepCopy) {
	TagLib tl = new TagLib(isCore);
	tl.appendixTags = duplicate(this.appendixTags, deepCopy);
	tl.displayName = this.displayName;
	tl.ELClass = this.ELClass;
	tl.exprTransformer = this.exprTransformer;
	tl.isCore = this.isCore;
	tl.nameSpace = this.nameSpace;
	tl.nameSpaceAndNameSpaceSeperator = this.nameSpaceAndNameSpaceSeperator;
	tl.nameSpaceSeperator = this.nameSpaceSeperator;
	tl.shortName = this.shortName;
	tl.tags = duplicate(this.tags, deepCopy);
	tl.type = this.type;
	tl.source = this.source;
	tl.ignoreUnknowTags = this.ignoreUnknowTags;

	return tl;
    }
657308
def copy(self):
    
    self_copy = self.dup()
    self_copy._scopes = copy.copy(self._scopes)
    return self_copy
412496
def copyDtd(self):
        
        ret = libxml2mod.xmlCopyDtd(self._o)
        if ret is None:raise treeError('xmlCopyDtd() failed')
        __tmp = xmlDtd(_obj=ret)
        return __tmp
240766
def copy(self):
        
        from .lists_and_dicts import ObserverList
        memo = {}
        memo[id(self)] = self
        memo[id(self.observers)] = ObserverList()
        return self.__deepcopy__(memo)