Given an interable of input quantity names and a methods dictionary,
    returns a list of output quantities that can be calculated.
557508
def get_calculatable_quantities(inputs, methods):
    '''
    
    '''
    output_quantities = []
    updated = True
    while updated:
        updated = False
        for output in methods.keys():
            if output in output_quantities or output in inputs:
                # we already know we can calculate this
                continue
            for args, func in methods[output].items():
                if all([arg in inputs or arg in output_quantities
                        for arg in args]):
                    output_quantities.append(output)
                    updated = True
                    break
    return tuple(output_quantities) + tuple(inputs)
1011505
public Method[] getMethods(Class clazz, Collection.Key methodName, int count) {
	Map<Key, Array> methodsMap = map.get(clazz);
	if (methodsMap == null) methodsMap = store(clazz);

	Array methods = methodsMap.get(methodName);
	if (methods == null) return null;

	Object o = methods.get(count + 1, null);
	if (o == null) return null;
	return (Method[]) o;
    }
887724
def get_method_names(obj):
        
        method_names = []
        
        for method_name in dir(obj):

            method = getattr(obj, method_name)

            if MethodReflector._is_method(method, method_name):
                method_names.append(method_name)

        return method_names
447054
def func(self, values):
        
        if self.method == METHOD_MEAN:
            return self.func_mean(values)
        elif self.method == METHOD_MAX:
            return self.func_max(values)
        elif self.method == METHOD_MIN:
            return self.func_min(values)
        elif self.method == METHOD_CUSTOM:
            return self.func_custom(values)
        else:
            raise UnknownEnsembleMethodException(self.method)
489116
def returned_types(self, method):
        
        result = []
        for rt in self.bodypart_types(method, input=False):
            result.append(rt)
        return result
1007567
def kwargs(self):
    
    return {k: v for k, v in self._kwargs.items() if k not in self._INTERNAL_FIELDS}
592582
def compose(method, other)
     return apply_to_quantity(method, other) unless Measurement === other
     other = other.as(unit) if other.unit.axis == unit.axis
     new_quantity = quantity.zero? ? 0.0 : quantity.to_f.send(method, other.quantity)
     Measurement.new(unit.send(method, other.unit), new_quantity)
    end
1038346
def map_input_output(item, api):
    
    if isinstance(item, list):
        return [map_input_output(it, api) for it in item]

    elif isinstance(item, dict) and 'class' in item:
        if item['class'].lower() == 'file':
            return File(id=item['path'], api=api)

    else:
        return item
286188
def get_method_list():
    '''
    
    '''
    methods = [str(_('Cash')),str(_('Check')),str(_('Bank/Debit Card')),str(_('Other'))]
    methods += ExpenseItem.objects.order_by().values_list('paymentMethod',flat=True).distinct()
    methods += RevenueItem.objects.order_by().values_list('paymentMethod',flat=True).distinct()
    methods_list = list(set(methods))

    if None in methods_list:
        methods_list.remove(None)

    return methods_list
405888
def _get_rh_methods(rh):
    """"""
    for k, v in vars(rh).items():
        if all([
            k in HTTP_METHODS,
            is_method(v),
            hasattr(v, "input_schema")
        ]):
            yield (k, v)
586854
def inspect_methods
      return [] unless constant.respond_to?(:methods)

      methods = get_methods.map do |name|
        method_information(:method, name)
      end

      return methods.sort_by(&:name)
    end
142462
def convert_the_getters(getters):
    
    return_list = []
    for getter in getters:
        
        if isinstance(getter,basestring):
            out_args = ""
            method_name = getter
            
        else:
            method_name, a = getter
            
            out_args = convert_the_args(a)
            
        return_list.append( (method_name, out_args) )
    return return_list
595487
def get_input_var_names(self):
        
        in_vars = copy.copy(self.input_vars)
        for idx, var in enumerate(in_vars):
            if self._map_in_out(var) is not None:
                in_vars[idx] = self._map_in_out(var)
        return in_vars
260005
def get_output_values(self):
        
        # Handle primitive values here and implicitly convert them to a dict because
        # it allows the API to be simpler.

        # Also influxDB mandates that each value also has a name so the default name
        # for any non-dict value is "value"
        if not isinstance(self.values, dict):
            metric_values = {'value': self.values}
        else:
            metric_values = self.values

        # Sort the values in lexicographically by value name
        sorted_values = sorted(metric_values.items())

        # Remove None values
        sorted_values = [(k, v) for k, v in sorted_values if v is not None]

        return u",".join(u"{0}={1}".format(format_string(k), format_value(v)) for k, v in sorted_values)
37770
def methods():
    ""
    pairs = inspect.getmembers(Containerizer, predicate=inspect.ismethod)
    return set(k for k, _ in pairs if k[0:1] != "_")
700497
def get_outputs_from_cm(index, cm):
    """"""
    return tuple(i for i in range(cm.shape[0]) if cm[index][i])
1236728
def get_methods(self):
        
        return [x
                for x in self.direct_methods] + [x
                                                 for x in self.virtual_methods]