def validate_source_string(source):
 return (unhexlify(source) if ((len(source) == 40) and (not source.startswith('http'))) else source)

def validate_source_string ( source ) : return ( unhexlify ( source ) if ( ( len ( source ) == 40 ) and ( not source . startswith ( 'http' ) ) ) else source )
function to check whether a source string is a valid source or not .