You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: pep440_constraint.go
    path of file: ./repos/grype/grype/version
    
    the code of the file until where you have to start completion: package version

import "fmt"

type pep440Constraint struct {
	raw        string
	expression constraintExpression
}

func (p pep440Constraint) String() string {
	if p.raw == "" {
		return "none (python)"
	}
	return fmt.Sprintf("%s (python)", p.raw)
}

func (p pep440Constraint) Satisfied(version *Version) (bool, error) {
	if p.raw == "" && version != nil {
		// an empty
    
func (p pep440Constraint) Satisfied(version *Version) (bool, error) {
	if p.raw == "" && version != nil {
		// an empty constraint is always satisfied
		return true, nil
	} else if version == nil {
		if p.raw != "" {
			// a non-empty constraint with no version given should always fail
			return false, nil
		}
		return true, nil
	}
	if version.Format != PythonFormat {
		return false, fmt.Errorf("(python) unsupported format: %s", version.Format)
	}

	if version.rich.pep440version == nil {
		return false, fmt.Errorf("no rich PEP440 version given: %+v", version)
	}
	return p.expression.satisfied(version)
}