code: def add(self, sgid, other, proto_spec, direction="in"):
          
          # returns bool
          # AuthorizeSecurityGroupIngress, AuthorizeSecurityGroupEgress
          if direction == "in":
              api = "AuthorizeSecurityGroupIngress"
          elif direction == "out":
              api = "AuthorizeSecurityGroupEgress"
          else:
              raise ValueError("direction must be one of ('in', 'out')")
          return self.modify(api, sgid, other, proto_spec)
docs: Add a security group rule to group <sgid>.
             Direction is either 'in' (ingress) or 'out' (egress).
             See modify() for other parameters.