You can save an indentation level above if you make this the first part of your 'if' above. Ie:

if 'uuid' in kwargs:
    <do this code below>
    return

<do the rest of the code above>