def METHOD_NAME(body, offset, cursor_position, ipyc):
    """
    Private equivalent of get_completions() use only for unit_testing.
    """
    debug = getattr(ipyc, 'debug', False)
    completions = _deduplicate_completions(
        body, ipyc.completions(body, offset))
    for c in completions:
        if not c.text:
            # Guard against completion machinery giving us an empty string.
            continue
        text = unicodedata.normalize('NFC', c.text)
        # When the first character of the completion has a zero length,
        # then it's probably a decomposed unicode character. E.g. caused by
        # the "\dot" completion. Try to compose again with the previous
        # character.
        if wcwidth(text[0]) == 0:
            if cursor_position + c.start > 0:
                char_before = body[c.start - 1]
                fixed_text = unicodedata.normalize(
                    'NFC', char_before + text)
                # Yield the modified completion instead, if this worked.
                if wcwidth(text[0:1]) == 1:
                    yield Completion(fixed_text, start_position=c.start - offset - 1)
                    continue
        # TODO: Use Jedi to determine meta_text
        # (Jedi currently has a bug that results in incorrect information.)
        # meta_text = ''
        # yield Completion(m, start_position=start_pos,
        #                  display_meta=meta_text)
        display_text = c.text
        adjusted_text = _adjust_completion_text_based_on_context(c.text, body, offset)
        if c.type == 'function':
            yield Completion(adjusted_text, start_position=c.start - offset, display=_elide(display_text+'()', body[c.start:c.end]), display_meta=c.type+c.signature)
        else:
            yield Completion(adjusted_text, start_position=c.start - offset, display=_elide(display_text,  body[c.start:c.end]), display_meta=c.type)