<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_security_group(self, name, description, vpc_id=None):
 """Create security group. @param name: Name of the new security group. @param description: Description of the new security group. @param vpc_id: ID of the VPC to which the security group will belong. @return: A C{Deferred} that will fire with a truth value for the success of the operation. """

        parameters = {"GroupName":  name, "GroupDescription": description}
        if vpc_id:
            parameters["VpcId"] = vpc_id
        query = self.query_factory(
            action="CreateSecurityGroup", creds=self.creds,
            endpoint=self.endpoint, other_params=parameters)
        d = query.submit()
        return d.addCallback(self.parser.create_security_group)