def _get_bindings(context, alist) -> List[Var]:
    """
    This utility is needed in order to handle following cases:
        With EXIR,
        - Some of the inputs can be literals (like axis, perms) and thus can be of types: list, int etc.
        - An Input Parameter of an op could be a list/tuple similar to our concat layer
    """
    results = []

    for i in alist:
        if isinstance(i, str):
            """
            torch.export args can be type of string:
            1. torch script strictly has name: variable mapping
            2. certain torch.export args can be strings,
               e.g. pad type. Since those args were equivalently enums, we introduced TORCH_STRING_ARGS
            3. some torch.export args can be arbitrary string, hence we just raise an warning.

            rdar://138953006 ([Torch.Export] Enforce `Name: Variable` Mapping in Context)
            The above radar is tracking if all string can fit in the context.
            """
            if i in context:
                results.append(context[i])
            elif i in TORCH_STRING_ARGS:
                results.append(i)
            else:
                results.append(i)
                logger.warning(
                    f"Binding {i} is neither a name of exisitng var in context, "
                    "nor a torch string argument."
                )
        elif isinstance(i, (list, tuple)) and all(isinstance(j, int) for j in i):
            results.append(mb.const(val=i))
        elif isinstance(i, (list, tuple)):
            results.append(_get_bindings(context, i))
        elif isinstance(i, (int, float)):
            results.append(mb.const(val=i))
        elif i is None:
            results.append(None)
        else:
            raise NotImplementedError(f"Binding of inputs of type {type(i)} not handled yet")

    return results

    This utility is needed in order to handle following cases:
        With EXIR,
        - Some of the inputs can be literals (like axis, perms) and thus can be of types: list, int etc.
        - An Input Parameter of an op could be a list/tuple similar to our concat layer
    
coremltools/converters/mil/frontend/torch/ops.py