def expand(self, values):
        expandedVars = []
        for var in self.vars:
            if ((var.name in values) and (values[var.name] is not None)):
                expandedVar = self._expandVar(var, values[var.name])
                if (expandedVar is not None):
                    expandedVars.append(expandedVar)
        if (len(expandedVars)):
            expanded = self.varJoiner.join(expandedVars)
            if (expanded is not None):
                return self.operator + expanded
        return None
dataset/ETHPy150Open tabatkins/bikeshed/bikeshed/apiclient/apiclient/uritemplate.py/Expansion.expand/original