def METHOD_NAME(word, namespace, *, obj=None, base=None):
    """Complete a list or dictionary with its indices:
    * integer numbers for list
    * any keys for dictionary
    :arg word: word to be completed
    :type word: str
    :arg namespace: namespace
    :type namespace: dict
    :arg obj: object evaluated from base
    :arg base: sub-string which can be evaluated into an object.
    :type base: str
    :returns: completion matches
    :rtype: list of str
    >>> complete_indices('foo', {'foo': range(5)})
    ['foo[0]', 'foo[1]', 'foo[2]', 'foo[3]', 'foo[4]']
    >>> complete_indices('foo', {'foo': {'bar':0, 1:2}})
    ['foo[1]', "foo['bar']"]
    >>> complete_indices("foo['b", {'foo': {'bar':0, 1:2}}, base='foo')
    ["foo['bar']"]
    """
    # FIXME: 'foo["b'
    if base is None:
        base = word
    if obj is None:
        try:
            obj = eval(base, namespace)
        except BaseException:
            return []
    if not hasattr(obj, '__getitem__'):
        # obj is not a list or dictionary
        return []
    obj_is_dict = is_dict(obj)
    # rare objects have a __getitem__ but no __len__ (eg. BMEdge)
    if not obj_is_dict:
        try:
            obj_len = len(obj)
        except TypeError:
            return []
    if obj_is_dict:
        # dictionary type
        matches = ['%s[%r]' % (base, key) for key in sorted(obj.keys())]
    else:
        # list type
        matches = ['%s[%d]' % (base, idx) for idx in range(obj_len)]
    if word != base:
        matches = [match for match in matches if match.startswith(word)]
    return matches