@register.filter<EOL>def human_bytes(value):
value = float(value)<EOL>if value >= <NUM_LIT>:<EOL><INDENT>gigabytes = value / <NUM_LIT><EOL>size = '<STR_LIT>' % gigabytes<EOL><DEDENT>elif value >= <NUM_LIT>:<EOL><INDENT>megabytes = value / <NUM_LIT><EOL>size = '<STR_LIT>' % megabytes<EOL><DEDENT>elif value >= <NUM_LIT>:<EOL><INDENT>kilobytes = value / <NUM_LIT><EOL>size = '<STR_LIT>' % kilobytes<EOL><DEDENT>else:<EOL><INDENT>size = '<STR_LIT>' % value<EOL><DEDENT>return size<EOL>
Convert a byte value into a human-readable format.