parameters: (self)
docstring: If signature (header) has not been read then read and
          validate it; otherwise do nothing.
docstring_summary: If signature (header) has not been read then read and
          validate it; otherwise do nothing.
docstring_tokens: If signature ( header ) has not been read then read and validate it ; otherwise do nothing .
function: def validate_signature(self):
          """If signature (header) has not been read then read and
          validate it; otherwise do nothing.
          """
  
          if self.signature:
              return
          self.signature = self.file.read(8)
          if self.signature != _signature:
              raise FormatError("PNG file has invalid signature.")
function_tokens: def validate_signature ( self ) : if self . signature : return self . signature = self . file . read ( 8 ) if self . signature != _signature : raise FormatError ( "PNG file has invalid signature." )