code: def get_group(group_or_groupname):
      
      if not group_or_groupname:
  
          return None
      if hasattr(group_or_groupname, "_getGroup"):
          return group_or_groupname
      gtool = get_tool("portal_groups")
      return gtool.getGroupById(group_or_groupname)
docs: Return Plone Group
  
      :param group_or_groupname: Plone group or the name of the group
      :type groupname:  GroupData/str
      :returns: Plone GroupData