code: def get_permissions_mode(permission_octal, name):
      
      read = PERMISSIONS[name]['read']
      write = PERMISSIONS[name]['write']
      execute = PERMISSIONS[name]['execute']
  
      # Read
      if permission_octal == 4:
          return read & ~write & ~execute
  
      # Write
      elif permission_octal == 2:
          return ~read & write & ~execute
  
      # Execute
      elif permission_octal == 1:
          return ~read & ~write & execute
  
      # Read & Write
      elif permission_octal == 6:
          return read & write & ~execute
  
      # Read & Execute
      elif permission_octal == 5:
          return read & ~write & execute
  
      # Write & Execute
      elif permission_octal == 3:
          return ~read & write & execute
  
      # Read, Write & Execute
      elif permission_octal == 7:
          return read & write & execute
  
      # No read, write or execute by default
      else:
          return ~read & ~write & ~execute
docs: Retrieve a user name group permissions bitwise code.