'Generates a name for the op, using a user-supplied name if possible.
Args:
op_str:     String representing the parsed op.
index:      Position in model_str of the start of the op.
name_str:   User-supplied {name} with {} that need removing or None.
Returns:
Selected name.'

def _GetLayerName(self, op_str, index, name_str):

    if name_str:
        return name_str[1:(-1)]
    else:
        return ((op_str.translate(self.transtab) + '_') + str(index))
