def _get_attachment_number(self, row):
    'Return the attachment number for an item.\n\n        In district courts, this can be easily extracted. In bankruptcy courts,\n        you must extract it, then subtract 1 from the value since these are\n        tallied and include the main document.\n        '
    number = int(row.xpath('.//a/text()')[0].strip())
    if self.is_bankruptcy:
        return (number - 1)
    else:
        return number
Return the attachment number for an item.

In district courts, this can be easily extracted. In bankruptcy courts,
you must extract it, then subtract 1 from the value since these are
tallied and include the main document.
def _get_attachment_number(self, row):
    'Return the attachment number for an item.\n\n        In district courts, this can be easily extracted. In bankruptcy courts,\n        you must extract it, then subtract 1 from the value since these are\n        tallied and include the main document.\n        '
    number = int(row.xpath('.//a/text()')[0].strip())
    if self.is_bankruptcy:
        return (number - 1)
    else:
        return number