def _get_auth_type(entity, id, includes):
 if (('user-tags' in includes) or ('user-ratings' in includes)):
  return AUTH_YES
 elif entity.startswith('collection'):
  if (not id):
   return AUTH_YES
  else:
   return AUTH_IFSET
 else:
  return AUTH_NO

def _get_auth_type ( entity , id , includes ) : if ( ( 'user-tags' in includes ) or ( 'user-ratings' in includes ) ) : return AUTH_YES elif entity . startswith ( 'collection' ) : if ( not id ) : return AUTH_YES else : return AUTH_IFSET else : return AUTH_NO
some calls require authentication .