def METHOD_NAME(item):
    description = item['body']
    # Don't skip empty lines because they delimit parts of description
    lines = [line for line in [x.strip() for x in (description.split('\n') if description else [])]]
    lines = [re.sub(r'\s+', ' ', l) for l in lines]
    category = ''
    entry = ''
    if lines:
        i = 0
        while i < len(lines):
            if re.match(r'(?i)^[>*_ ]*change\s*log\s*category', lines[i]):
                i += 1
                if i >= len(lines):
                    break
                # Can have one empty line between header and the category itself. Filter it out.
                if not lines[i]:
                    i += 1
                    if i >= len(lines):
                        break
                category = re.sub(r'^[-*\s]*', '', lines[i])
                i += 1
            elif re.match(r'(?i)^[>*_ ]*(short\s*description|change\s*log\s*entry)', lines[i]):
                i += 1
                # Can have one empty line between header and the entry itself. Filter it out.
                if i < len(lines) and not lines[i]:
                    i += 1
                # All following lines until empty one are the changelog entry.
                entry_lines = []
                while i < len(lines) and lines[i]:
                    entry_lines.append(lines[i])
                    i += 1
                entry = ' '.join(entry_lines)
            else:
                i += 1
    if not category:
        # Shouldn't happen, because description check in CI should catch such PRs.
        # Fall through, so that it shows up in output and the user can fix it.
        category = "NO CL CATEGORY"
    # Filter out the PR categories that are not for changelog.
    if re.match(r'(?i)doc|((non|in|not|un)[-\s]*significant)|(not[ ]*for[ ]*changelog)', category):
        return False
    if not entry:
        # Shouldn't happen, because description check in CI should catch such PRs.
        category = "NO CL ENTRY"
        entry = "NO CL ENTRY:  '" + item['title'] + "'"
    entry = entry.strip()
    if entry[-1] != '.':
        entry += '.'
    item['entry'] = entry
    item['category'] = category
    return True