Add use_* methods for calculations.

        Code below enables the usage
        my_calculation.use_parameters(my_parameters)
779810
def _use_methods(cls):
        
        use_dict = JobCalculation._use_methods
        use_dict.update({
            "parameters": {
                'valid_types': RipsDistanceMatrixParameters,
                'additional_parameter': None,
                'linkname': 'parameters',
                'docstring': 'add command line parameters',
            },
            "distance_matrix": {
                'valid_types': SinglefileData,
                'additional_parameter': None,
                'linkname': 'distance_matrix',
                'docstring': "distance matrix of point cloud",
            },
            "remote_folder": {
                'valid_types': RemoteData,
                'additional_parameter': None,
                'linkname': 'remote_folder',
                'docstring': "remote folder containing distance matrix",
            },
        })
        return use_dict
983246
def add_custom(self, params):
        

        if isinstance(params, dict) is False:
            raise InvalidUsage("custom parameters must be of type `dict`")

        self._custom_params.update(params)
1007286
public boolean usesMethod(String className, String methodName, String descriptor) {
		int classIndex = findClass(className);
		if (classIndex == NOT_FOUND) return false;
		int nameAndTypeIndex = findNameAndType(methodName, descriptor);
		if (nameAndTypeIndex == NOT_FOUND) return false;
		
		for (int i = 1; i < maxPoolSize; i++) {
			if (isMethod(i) && 
					readValue(offsets[i]) == classIndex && 
					readValue(offsets[i] + 2) == nameAndTypeIndex) return true;
		}
		return false;
	}
992999
function (name, methods) {
        //this.callSuper(methods);
        this.name = name;
        this.methods = {};

        if (methods) {
            var n;
            //Add methods
            n = methods.length;
            while (n > 0) {
                n -= 1;
                this.methods[methods[n]] = true;
            }
        }
    }
51737
def enhance_method(method, callbacks)
      _method = (PREFIX + method.to_s).to_sym
      alias_method _method, method

      self.send(:define_method, method) do |*args, &blk|
        [callbacks, _method].flatten.each do |callback|
          break unless self.send(callback, *args, &blk)
        end
      end
    end
600703
public boolean usesMethod(String className, String methodName) {
		int classIndex = findClass(className);
		if (classIndex == NOT_FOUND) return false;
		int methodNameIndex = findUtf8(methodName);
		if (methodNameIndex == NOT_FOUND) return false;
		
		for (int i = 1; i < maxPoolSize; i++) {
			if (isMethod(i) && readValue(offsets[i]) == classIndex) {
				int nameAndTypeIndex = readValue(offsets[i] + 2);
				if (readValue(offsets[nameAndTypeIndex]) == methodNameIndex) return true;
			}
		}
		return false;
	}
1026055
private void addMethodInfo(MethodDoc method, Content dl) {
        ClassDoc[] intfacs = method.containingClass().interfaces();
        MethodDoc overriddenMethod = method.overriddenMethod();
        // Check whether there is any implementation or overridden info to be
        // printed. If no overridden or implementation info needs to be
        // printed, do not print this section.
        if ((intfacs.length > 0 &&
                new ImplementedMethods(method, this.configuration).build().length > 0) ||
                overriddenMethod != null) {
            MethodWriterImpl.addImplementsInfo(this, method, dl);
            if (overriddenMethod != null) {
                MethodWriterImpl.addOverridden(this,
                        method.overriddenType(), overriddenMethod, dl);
            }
        }
    }
1298982
def context_methods
      @context.instance_methods.inject({}) do |methods, name|
        methods.merge(name.to_sym => @context.instance_method(name))
      end
    end
1197895
void addToOutputVar(PyExpr pyExpr) {
    boolean isList = pyExpr instanceof PyListExpr;
    if (isList && !getOutputVarIsInited()) {
      appendLine(getOutputVarName(), " = ", pyExpr.getText());
    } else {
      initOutputVarIfNecessary();
      String function = isList ? ".extend(" : ".append(";
      appendLine(getOutputVarName(), function, pyExpr.getText(), ")");
    }
    setOutputVarInited();
  }
150253
def add_flex_arithmetic_methods(cls):
    
    flex_arith_method, flex_comp_method, _, _, _ = _get_method_wrappers(cls)
    new_methods = _create_methods(cls, flex_arith_method,
                                  flex_comp_method, bool_method=None,
                                  special=False)
    new_methods.update(dict(multiply=new_methods['mul'],
                            subtract=new_methods['sub'],
                            divide=new_methods['div']))
    # opt out of bool flex methods for now
    assert not any(kname in new_methods for kname in ('ror_', 'rxor', 'rand_'))

    add_methods(cls, new_methods=new_methods)
774473
def use_kwargs(self, *args, **kwargs) -> typing.Callable:
        
        return super().use_kwargs(*args, **kwargs)
1182867
def add_new_repr_method(cls):
    

    if isinstance(cls.__repr__, WrapperDescriptorType):
        cls.__repr__ = lambda self: f"<{self.__class__.__name__}, id={hex(id(self))}>"
    else:
        # Keep the user-defined __repr__ method
        pass
1069719
private void addMethodDefTriples(URIReference objURI,
                                     DOReader reader,
                                     Set<Triple> set)
            throws ResourceIndexException {
        try {
            for (MethodDef element : getAbstractMethods(reader)) {
                add(objURI, MODEL.DEFINES_METHOD, element.methodName, set);
            }
        } catch (ResourceIndexException e) {
            throw e;
        } catch (Exception e) {
            throw new ResourceIndexException("Error adding method def "
                    + "triples", e);
        }
    }
1300620
def create_usage(self, sub_add_on, usage):
        """"""
        url = urljoin(self._url, '/add_ons/%s/usage' % (sub_add_on.add_on_code,))
        return usage.post(url)
306043
def add_scope(self, scope_type, scope_name, scope_start, is_method=False):
        """"""
        if self._curr is not None:
            self._curr['end'] = scope_start - 1  # close last scope
        self._curr = {
            'type': scope_type, 'name': scope_name,
            'start': scope_start, 'end': scope_start
        }

        if is_method and self._positions:
            last = self._positions[-1]
            if not 'methods' in last:
                last['methods'] = []
            last['methods'].append(self._curr)
        else:
            self._positions.append(self._curr)
1137686
def add(self, *args, **kwargs):
        
        return self._apply(operator.add, *args, **kwargs)
250926
def add_params(self, **kw):
        
        for k, v in kw.items():
            if (k not in self.params) and (k not in self.specific_params):
                raise ParameterError('"%s" is not a valid parameter for %s'
                                     % (k, self.__class__.__name__))
            try:
                self.params[k].validate(v)
            except KeyError:
                self.specific_params[k].validate(v)

        self._orig_kwargs.update(kw)
        self.kwargs = self._orig_kwargs.copy()