def resolve_fragment(self, document, fragment):

        fragment = fragment.lstrip("/")
        parts = unquote(fragment).split("/") if fragment else []

        for part in parts:
            part = part.replace("~1", "/").replace("~0", "~")

            if isinstance(document, Sequence):
                # Array indexes should be turned into integers
                try:
                    part = int(part)
                except ValueError:
                    pass
            try:
                document = document[part]
            except (TypeError, LookupError):
                raise RefResolutionError(
                    "Unresolvable JSON pointer: %r" % fragment
                )

        return document
Fetch the sequence of twitter.Status messages for a user's friends
dataset/ETHPy150Open danielyule/hearthbreaker/jsonschema/validators.py/RefResolver.resolve_fragment--crossover with--dataset/ETHPy150Open livid/v2ex/twitter/twitter.py/Api.GetListTimeline